org.mortbay.jetty.ajp
Class Ajp13Generator
java.lang.Object
org.mortbay.jetty.AbstractGenerator
org.mortbay.jetty.ajp.Ajp13Generator
- All Implemented Interfaces:
- org.mortbay.jetty.Generator
public class Ajp13Generator
- extends org.mortbay.jetty.AbstractGenerator
- Author:
- lagdeppa (at) exist.com, Greg Wilkins
Nested classes/interfaces inherited from class org.mortbay.jetty.AbstractGenerator |
org.mortbay.jetty.AbstractGenerator.Output, org.mortbay.jetty.AbstractGenerator.OutputWriter |
Fields inherited from class org.mortbay.jetty.AbstractGenerator |
_buffer, _buffers, _close, _content, _contentBufferSize, _contentLength, _contentWritten, _endp, _head, _header, _headerBufferSize, _last, _method, _noContent, _reason, _state, _status, _uri, _version, STATE_CONTENT, STATE_END, STATE_FLUSHING, STATE_HEADER |
Fields inherited from interface org.mortbay.jetty.Generator |
LAST, MORE |
Constructor Summary |
Ajp13Generator(org.mortbay.io.Buffers buffers,
org.mortbay.io.EndPoint io,
int headerBufferSize,
int contentBufferSize)
|
Methods inherited from class org.mortbay.jetty.AbstractGenerator |
getContentBufferSize, getContentWritten, getReason, getReasonBuffer, getSendServerVersion, getState, getUncheckedBuffer, getVersion, increaseContentBufferSize, isBufferFull, isCommitted, isContentWritten, isHead, isIdle, isPersistent, isState, resetBuffer, sendError, setContentLength, setHead, setPersistent, setRequest, setResponse, setSendServerVersion, setVersion |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Ajp13Generator
public Ajp13Generator(org.mortbay.io.Buffers buffers,
org.mortbay.io.EndPoint io,
int headerBufferSize,
int contentBufferSize)
setServerVersion
public static void setServerVersion(java.lang.String version)
reset
public void reset(boolean returnBuffers)
- Specified by:
reset
in interface org.mortbay.jetty.Generator
- Overrides:
reset
in class org.mortbay.jetty.AbstractGenerator
addContent
public void addContent(org.mortbay.io.Buffer content,
boolean last)
throws java.io.IOException
- Add content.
- Parameters:
content
- last
-
- Throws:
java.lang.IllegalArgumentException
- if content
is
immutable
.
java.lang.IllegalStateException
- If the request is not expecting any more content, or if the
buffers are full and cannot be flushed.
java.io.IOException
- if there is a problem flushing the buffers.
addContent
public boolean addContent(byte b)
throws java.io.IOException
- Add content.
- Parameters:
b
- byte
- Returns:
- true if the buffers are full
- Throws:
java.io.IOException
prepareUncheckedAddContent
protected int prepareUncheckedAddContent()
throws java.io.IOException
- Prepare buffer for unchecked writes. Prepare the generator buffer to
receive unchecked writes
- Specified by:
prepareUncheckedAddContent
in class org.mortbay.jetty.AbstractGenerator
- Returns:
- the available space in the buffer.
- Throws:
java.io.IOException
completeHeader
public void completeHeader(org.mortbay.jetty.HttpFields fields,
boolean allContentAdded)
throws java.io.IOException
- Specified by:
completeHeader
in interface org.mortbay.jetty.Generator
- Specified by:
completeHeader
in class org.mortbay.jetty.AbstractGenerator
- Throws:
java.io.IOException
complete
public void complete()
throws java.io.IOException
- Complete the message.
- Specified by:
complete
in interface org.mortbay.jetty.Generator
- Overrides:
complete
in class org.mortbay.jetty.AbstractGenerator
- Throws:
java.io.IOException
flush
public long flush()
throws java.io.IOException
- Specified by:
flush
in interface org.mortbay.jetty.Generator
- Specified by:
flush
in class org.mortbay.jetty.AbstractGenerator
- Throws:
java.io.IOException
isComplete
public boolean isComplete()
- Specified by:
isComplete
in interface org.mortbay.jetty.Generator
- Overrides:
isComplete
in class org.mortbay.jetty.AbstractGenerator
getBodyChunk
public void getBodyChunk()
throws java.io.IOException
- Throws:
java.io.IOException
gotBody
public void gotBody()
sendCPong
public void sendCPong()
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2009 Mortbay Consulting Pty. Ltd. All Rights Reserved.