|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.messages.Message
com.limegroup.gnutella.messages.vendor.VendorMessage
Vendor Messages are Gnutella Messages that are NEVER forwarded after recieved. This message is abstract because it provides common methods for ALL VendorMessages, but it makes no sense to instantiate a VendorMessage.
Field Summary | |
protected static byte[] |
F_BEAR_VENDOR_ID
|
protected static byte[] |
F_GTKG_VENDOR_ID
|
protected static int |
F_HOPS_FLOW
|
protected static int |
F_LIME_ACK
|
protected static byte[] |
F_LIME_VENDOR_ID
|
protected static int |
F_MESSAGES_SUPPORTED
|
protected static byte[] |
F_NULL_VENDOR_ID
|
protected static int |
F_PUSH_PROXY_ACK
|
protected static int |
F_PUSH_PROXY_REQ
|
protected static int |
F_REPLY_NUMBER
|
protected static int |
F_TCP_CONNECT_BACK
|
protected static int |
F_UDP_CONNECT_BACK
|
Fields inherited from class com.limegroup.gnutella.messages.Message |
F_PING, F_PING_REPLY, F_PUSH, F_QUERY, F_QUERY_REPLY, F_ROUTE_TABLE_UPDATE, F_VENDOR_MESSAGE, F_VENDOR_MESSAGE_STABLE, N_MULTICAST, N_TCP, N_UDP, N_UNKNOWN, RECORD_STATS, SOFT_MAX |
Constructor Summary | |
protected |
VendorMessage(byte[] guid,
byte ttl,
byte hops,
byte[] vendorID,
int selector,
int version,
byte[] payload)
Should be used when encountered a Message from the Network. |
protected |
VendorMessage(byte[] vendorIDBytes,
int selector,
int version,
byte[] payload)
Package Level access only. |
Method Summary | |
static VendorMessage |
deriveVendorMessage(byte[] guid,
byte ttl,
byte hops,
byte[] fromNetwork)
|
boolean |
equals(java.lang.Object other)
|
protected byte[] |
getPayload()
Allows subclasses to make changes gain access to the payload. |
protected int |
getVersion()
|
int |
hashCode()
|
void |
recordDrop()
Records the dropping of this message in statistics. |
Message |
stripExtendedPayload()
Returns a message identical to this but without any extended (typically GGEP) data. |
protected void |
writePayload(java.io.OutputStream out)
|
Methods inherited from class com.limegroup.gnutella.messages.Message |
compareTo, getCreationTime, getFunc, getGUID, getHops, getLength, getNetwork, getPriority, getTotalLength, getTTL, hop, isMulticast, isTCP, isUDP, isUnknownNetwork, makeGuid, read, read, read, read, read, readNullTerminatedBytes, repOk, setGUID, setHops, setPriority, setTTL, toString, updateLength, write, writeGemExtension, writeGemExtension, writeGemExtensions |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final int F_MESSAGES_SUPPORTED
protected static final int F_HOPS_FLOW
protected static final int F_TCP_CONNECT_BACK
protected static final int F_UDP_CONNECT_BACK
protected static final int F_LIME_ACK
protected static final int F_REPLY_NUMBER
protected static final int F_PUSH_PROXY_REQ
protected static final int F_PUSH_PROXY_ACK
protected static final byte[] F_LIME_VENDOR_ID
protected static final byte[] F_BEAR_VENDOR_ID
protected static final byte[] F_GTKG_VENDOR_ID
protected static final byte[] F_NULL_VENDOR_ID
Constructor Detail |
protected VendorMessage(byte[] vendorIDBytes, int selector, int version, byte[] payload) throws BadPacketException
vendorIDBytes
- The Vendor ID of this message (bytes).selector
- The selector of the message.version
- The version of this message.payload
- The payload (not including vendorIDBytes, selector, and
version.
BadPacketException
- Thrown if vendorIDBytes, selector,
or version is 'too big'.
java.lang.NullPointerException
- Thrown if payload or vendorIDBytes are
null.protected VendorMessage(byte[] guid, byte ttl, byte hops, byte[] vendorID, int selector, int version, byte[] payload) throws BadPacketException
Method Detail |
protected byte[] getPayload()
protected int getVersion()
public static VendorMessage deriveVendorMessage(byte[] guid, byte ttl, byte hops, byte[] fromNetwork) throws BadPacketException
BadPacketException
public boolean equals(java.lang.Object other)
public int hashCode()
protected void writePayload(java.io.OutputStream out) throws java.io.IOException
writePayload
in class Message
java.io.IOException
public Message stripExtendedPayload()
Message
stripExtendedPayload
in class Message
public void recordDrop()
Message
recordDrop
in class Message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |