org.mortbay.jetty.ajp
Class Ajp13Generator
java.lang.Object
org.mortbay.jetty.AbstractGenerator
org.mortbay.jetty.ajp.Ajp13Generator
- All Implemented Interfaces:
- Generator
public class Ajp13Generator
- extends AbstractGenerator
- Author:
- lagdeppa (at) exist.com, Greg Wilkins
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 |
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(Buffers buffers,
EndPoint io,
int headerBufferSize,
int contentBufferSize)
setServerVersion
public static void setServerVersion(String version)
reset
public void reset(boolean returnBuffers)
- Specified by:
reset
in interface Generator
- Overrides:
reset
in class AbstractGenerator
addContent
public void addContent(Buffer content,
boolean last)
throws IOException
- Add content.
- Parameters:
content
- last
-
- Throws:
IllegalArgumentException
- if content
is
immutable
.
IllegalStateException
- If the request is not expecting any more content, or if the
buffers are full and cannot be flushed.
IOException
- if there is a problem flushing the buffers.
addContent
public boolean addContent(byte b)
throws IOException
- Add content.
- Parameters:
b
- byte
- Returns:
- true if the buffers are full
- Throws:
IOException
prepareUncheckedAddContent
protected int prepareUncheckedAddContent()
throws IOException
- Prepare buffer for unchecked writes. Prepare the generator buffer to
receive unchecked writes
- Specified by:
prepareUncheckedAddContent
in class AbstractGenerator
- Returns:
- the available space in the buffer.
- Throws:
IOException
completeHeader
public void completeHeader(HttpFields fields,
boolean allContentAdded)
throws IOException
- Specified by:
completeHeader
in interface Generator
- Specified by:
completeHeader
in class AbstractGenerator
- Throws:
IOException
complete
public void complete()
throws IOException
- Complete the message.
- Specified by:
complete
in interface Generator
- Overrides:
complete
in class AbstractGenerator
- Throws:
IOException
flush
public long flush()
throws IOException
- Specified by:
flush
in interface Generator
- Specified by:
flush
in class AbstractGenerator
- Throws:
IOException
isComplete
public boolean isComplete()
- Specified by:
isComplete
in interface Generator
- Overrides:
isComplete
in class AbstractGenerator
getBodyChunk
public void getBodyChunk()
throws IOException
- Throws:
IOException
gotBody
public void gotBody()
sendCPong
public void sendCPong()
throws IOException
- Throws:
IOException
Copyright © 1995-2009 Mort Bay Consulting. All Rights Reserved.