| java.lang.Object org.apache.jk.core.Msg
All known Subclasses: org.apache.jk.common.MsgAjp,
Msg | abstract public class Msg (Code) | | A single packet for communication between the web server and the
container.
In a more generic sense, it's the event that drives the processing chain.
XXX Use Event, make Msg a particular case.
author: Henri Gomez [hgomez@apache.org] author: Dan Milstein [danmil@shore.net] author: Keith Wannamaker [Keith@Wannamaker.org] author: Kevin Seguin author: Costin Manolache |
Method Summary | |
abstract public void | appendByte(int val) | abstract public void | appendByteChunk(ByteChunk bc) | abstract public void | appendBytes(MessageBytes mb) | abstract public void | appendBytes(byte b, int off, int numBytes) Copy a chunk of bytes into the packet, starting at the current
write position. | abstract public void | appendInt(int val) | abstract public void | appendLongInt(int val) | abstract public void | dump(String msg) | abstract public void | end() For a packet to be sent to the web server, finish the process of
accumulating data and write the length of the data payload into
the header. | abstract public byte[] | getBuffer() | abstract public byte | getByte() | abstract public void | getBytes(MessageBytes mb) | abstract public int | getBytes(byte dest) Copy a chunk of bytes from the packet into an array and advance
the read position past the chunk. | abstract public int | getHeaderLength() | abstract public int | getInt() Read an integer from packet, and advance the read position past
it. | abstract public int | getLen() | abstract public int | getLongInt() Read a 32 bits integer from packet, and advance the read position past
it. | public static String | hexLine(byte buf, int start, int len) | abstract public byte | peekByte() | abstract public int | peekInt() | abstract public int | processHeader() | abstract public void | reset() Prepare this packet for accumulating a message from the container to
the web server. |
appendByte | abstract public void appendByte(int val)(Code) | | |
appendBytes | abstract public void appendBytes(byte b, int off, int numBytes)(Code) | | Copy a chunk of bytes into the packet, starting at the current
write position. The chunk of bytes is encoded with the length
in two bytes first, then the data itself, and finally a
terminating \0 (which is not included in the encoded
length).
Parameters: b - The array from which to copy bytes. Parameters: off - The offset into the array at which to start copying Parameters: len - The number of bytes to copy. |
appendInt | abstract public void appendInt(int val)(Code) | | |
appendLongInt | abstract public void appendLongInt(int val)(Code) | | |
end | abstract public void end()(Code) | | For a packet to be sent to the web server, finish the process of
accumulating data and write the length of the data payload into
the header.
|
getBuffer | abstract public byte[] getBuffer()(Code) | | |
getByte | abstract public byte getByte()(Code) | | |
getBytes | abstract public int getBytes(byte dest)(Code) | | Copy a chunk of bytes from the packet into an array and advance
the read position past the chunk. See appendBytes() for details
on the encoding.
The number of bytes copied. |
getHeaderLength | abstract public int getHeaderLength()(Code) | | |
getInt | abstract public int getInt()(Code) | | Read an integer from packet, and advance the read position past
it. Integers are encoded as two unsigned bytes with the
high-order byte first, and, as far as I can tell, in
little-endian order within each byte.
|
getLen | abstract public int getLen()(Code) | | |
getLongInt | abstract public int getLongInt()(Code) | | Read a 32 bits integer from packet, and advance the read position past
it. Integers are encoded as four unsigned bytes with the
high-order byte first, and, as far as I can tell, in
little-endian order within each byte.
|
hexLine | public static String hexLine(byte buf, int start, int len)(Code) | | |
peekByte | abstract public byte peekByte()(Code) | | |
peekInt | abstract public int peekInt()(Code) | | |
processHeader | abstract public int processHeader()(Code) | | |
reset | abstract public void reset()(Code) | | Prepare this packet for accumulating a message from the container to
the web server. Set the write position to just after the header
(but leave the length unwritten, because it is as yet unknown).
|
|
|