|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.coyote.ajp.AjpMessage
A single packet for communication between the web server and the container. Designed to be reused many times with no creation of garbage. Understands the format of data types for these packets. Can be used (somewhat confusingly) for both incoming and outgoing packets.
Constructor Summary | |
AjpMessage()
|
Method Summary | |
void |
appendByte(int val)
|
void |
appendByteChunk(ByteChunk bc)
|
void |
appendBytes(byte[] b,
int off,
int numBytes)
Copy a chunk of bytes into the packet, starting at the current write position. |
void |
appendBytes(MessageBytes mb)
Write a String out at the current write position. |
void |
appendCharChunk(CharChunk cc)
|
void |
appendInt(int val)
Add an int. |
void |
appendLongInt(int val)
|
void |
appendString(java.lang.String str)
|
void |
dump(java.lang.String msg)
|
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. |
byte[] |
getBuffer()
|
byte |
getByte()
|
int |
getBytes(byte[] dest)
Copy a chunk of bytes from the packet into an array and advance the read position past the chunk. |
void |
getBytes(MessageBytes mb)
|
int |
getHeaderLength()
|
int |
getInt()
Read an integer from packet, and advance the read position past it. |
int |
getLen()
|
int |
getLongInt()
Read a 32 bits integer from packet, and advance the read position past it. |
static java.lang.String |
hexLine(byte[] buf,
int start,
int len)
|
byte |
peekByte()
|
int |
peekInt()
|
int |
processHeader()
|
void |
reset()
Prepare this packet for accumulating a message from the container to the web server. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AjpMessage()
Method Detail |
public void reset()
public void end()
public byte[] getBuffer()
public int getLen()
public void appendInt(int val)
val
- The integer to write.public void appendByte(int val)
public void appendLongInt(int val)
public void appendBytes(MessageBytes mb) throws java.io.IOException
java.io.IOException
public void appendByteChunk(ByteChunk bc) throws java.io.IOException
java.io.IOException
public void appendCharChunk(CharChunk cc) throws java.io.IOException
java.io.IOException
public void appendString(java.lang.String str) throws java.io.IOException
java.io.IOException
public void appendBytes(byte[] b, int off, int numBytes)
b
- The array from which to copy bytes.off
- The offset into the array at which to start copyingnumBytes
- The number of bytes to copy.public int getInt()
public int peekInt()
public byte getByte()
public byte peekByte()
public void getBytes(MessageBytes mb)
public int getBytes(byte[] dest)
public int getLongInt()
public int getHeaderLength()
public int processHeader()
public void dump(java.lang.String msg)
public static java.lang.String hexLine(byte[] buf, int start, int len)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |