|
Apache Tomcat 6.0.53 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.jk.core.Msg
org.apache.jk.common.MsgAjp
public class MsgAjp
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. See Ajp14/Ajp13Packet.java.
| Constructor Summary | |
|---|---|
MsgAjp()
Deprecated. Use the buffer size constructor. |
|
MsgAjp(int bsize)
Constructor that takes a buffer size |
|
| 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 |
appendInt(int val)
Add an int. |
void |
appendLongInt(int val)
|
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 MsgAjp(int bsize)
public MsgAjp()
| Method Detail |
|---|
public void reset()
reset in class Msgpublic void end()
end in class Msgpublic byte[] getBuffer()
getBuffer in class Msgpublic int getLen()
getLen in class Msgpublic void appendInt(int val)
appendInt in class Msgval - The integer to write.public void appendByte(int val)
appendByte in class Msgpublic void appendLongInt(int val)
appendLongInt in class Msg
public void appendBytes(MessageBytes mb)
throws java.io.IOException
appendBytes in class Msgjava.io.IOException
public void appendByteChunk(ByteChunk bc)
throws java.io.IOException
appendByteChunk in class Msgjava.io.IOException
public void appendBytes(byte[] b,
int off,
int numBytes)
appendBytes in class Msgb - 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()
getInt in class Msgpublic int peekInt()
peekInt in class Msgpublic byte getByte()
getByte in class Msgpublic byte peekByte()
peekByte in class Msgpublic void getBytes(MessageBytes mb)
getBytes in class Msgpublic int getBytes(byte[] dest)
getBytes in class Msgpublic int getLongInt()
getLongInt in class Msgpublic int getHeaderLength()
getHeaderLength in class Msgpublic int processHeader()
processHeader in class Msgpublic void dump(java.lang.String msg)
dump in class Msg
public static java.lang.String hexLine(byte[] buf,
int start,
int len)
|
Apache Tomcat 6.0.53 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||