Save This Page
Home » apache-tomcat-6.0.26-src » org.apache.jk » core » [javadoc | source]
org.apache.jk.core
abstract public class: Msg [javadoc | source]
java.lang.Object
   org.apache.jk.core.Msg

Direct Known Subclasses:
    MsgAjp

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.
Method from org.apache.jk.core.Msg Summary:
appendByte,   appendByteChunk,   appendBytes,   appendBytes,   appendInt,   appendLongInt,   dump,   end,   getBuffer,   getByte,   getBytes,   getBytes,   getHeaderLength,   getInt,   getLen,   getLongInt,   hexLine,   peekByte,   peekInt,   processHeader,   reset
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jk.core.Msg Detail:
 abstract public  void appendByte(int val)
 abstract public  void appendByteChunk(ByteChunk bc) throws IOException
 abstract public  void appendBytes(MessageBytes mb) throws IOException
 abstract public  void appendBytes(byte[] b,
    int off,
    int numBytes)
    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).
 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. See appendBytes() for details on the encoding.
 abstract public int getHeaderLength()
 abstract public int getInt()
    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.
 abstract public int getLen()
 abstract public int getLongInt()
    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.
 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. Set the write position to just after the header (but leave the length unwritten, because it is as yet unknown).