|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jk.core.Msg org.apache.jk.common.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 Msg
public void end()
end
in class Msg
public byte[] getBuffer()
getBuffer
in class Msg
public int getLen()
getLen
in class Msg
public void appendInt(int val)
appendInt
in class Msg
val
- The integer to write.public void appendByte(int val)
appendByte
in class Msg
public void appendLongInt(int val)
appendLongInt
in class Msg
public void appendBytes(MessageBytes mb) throws java.io.IOException
appendBytes
in class Msg
java.io.IOException
public void appendByteChunk(ByteChunk bc) throws java.io.IOException
appendByteChunk
in class Msg
java.io.IOException
public void appendBytes(byte[] b, int off, int numBytes)
appendBytes
in class Msg
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()
getInt
in class Msg
public int peekInt()
peekInt
in class Msg
public byte getByte()
getByte
in class Msg
public byte peekByte()
peekByte
in class Msg
public void getBytes(MessageBytes mb)
getBytes
in class Msg
public int getBytes(byte[] dest)
getBytes
in class Msg
public int getLongInt()
getLongInt
in class Msg
public int getHeaderLength()
getHeaderLength
in class Msg
public int processHeader()
processHeader
in class Msg
public void dump(java.lang.String msg)
dump
in class 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 |