| java.lang.Object org.w3c.www.protocol.http.icp.ICPMessage
All known Subclasses: org.w3c.www.protocol.http.icp.ICPQuery, org.w3c.www.protocol.http.icp.ICPReply,
ICPMessage | class ICPMessage implements ICP(Code) | | |
Field Summary | |
protected InetAddress | addr The InetAddress of the sender or null otherwise. | protected int | id The identifier of the message. | protected int | opcode The ICP opcde for that message. | protected int | options The options for this message. | protected int | port The port number of the sender of that message, or -1
if that message was created locally. | URL | url The URL of the message. | protected int | version The ICP major version of the message. |
Method Summary | |
protected int | getByteArrayLength() Get the length of that ICP message, if it were to be emitted. | final protected int | getIdentifier() Get the identifier of that ICP message. | final protected int | getOpcode() Get the opcode for this message. | public InetAddress | getSenderAddress() Get the address of the host that sent this packet. | public int | getSenderPort() Get the port number from which this message was emitted. | final protected URL | getURL() Get the URL contained in that message. | protected static ICPMessage | parse(DatagramPacket p) Parse the given datagram into an ICP message. | protected int | parse(byte buf, int off, int len) | protected int | toByteArray(byte buf) Pack that message into a byte array suitable for emitting.
Parameters: buf - The array to pack the request in. |
addr | protected InetAddress addr(Code) | | The InetAddress of the sender or null otherwise.
|
id | protected int id(Code) | | The identifier of the message.
|
opcode | protected int opcode(Code) | | The ICP opcde for that message.
|
options | protected int options(Code) | | The options for this message.
|
port | protected int port(Code) | | The port number of the sender of that message, or -1
if that message was created locally.
|
version | protected int version(Code) | | The ICP major version of the message.
|
getByteArrayLength | protected int getByteArrayLength()(Code) | | Get the length of that ICP message, if it were to be emitted.
The length of the packet that would be emitted. |
getIdentifier | final protected int getIdentifier()(Code) | | Get the identifier of that ICP message.
An integer identifier. |
getOpcode | final protected int getOpcode()(Code) | | Get the opcode for this message.
An integer opcode (as defined by the ICP protocol). See Also: ICP |
getSenderAddress | public InetAddress getSenderAddress()(Code) | | Get the address of the host that sent this packet.
An InetAddress instance, or null if the messagewas created locally. |
getSenderPort | public int getSenderPort()(Code) | | Get the port number from which this message was emitted.
A integer port number. |
getURL | final protected URL getURL()(Code) | | Get the URL contained in that message.
An URL instance. |
toByteArray | protected int toByteArray(byte buf)(Code) | | Pack that message into a byte array suitable for emitting.
Parameters: buf - The array to pack the request in. The length of the query, in bytes, or a negative numberrepresenting the size of the query. |
|
|