com.limegroup.gnutella.messages.vendor
Class MessagesSupportedVendorMessage
java.lang.Object
com.limegroup.gnutella.messages.AbstractMessage
com.limegroup.gnutella.messages.vendor.AbstractVendorMessage
com.limegroup.gnutella.messages.vendor.MessagesSupportedVendorMessage
- All Implemented Interfaces:
- Message, VendorMessage, VendorMessage.ControlMessage, Comparable<Message>
public final class MessagesSupportedVendorMessage
- extends AbstractVendorMessage
- implements VendorMessage.ControlMessage
The message that lets other know what messages you support. Everytime you
add a subclass of VendorMessage you should modify this class (assuming your
message is delivered over TCP).
| Fields inherited from interface com.limegroup.gnutella.messages.vendor.VendorMessage |
F_ADVANCED_TOGGLE, F_BEAR_VENDOR_ID, F_CAPABILITIES, F_CONTENT_REQ, F_CONTENT_RESP, F_CRAWLER_PING, F_CRAWLER_PONG, F_DHT_CONTACTS, F_GIVE_STATS, F_GTKG_VENDOR_ID, F_HEADER_UPDATE, F_HOPS_FLOW, F_INSPECTION_REQ, F_INSPECTION_RESP, F_LIME_ACK, F_LIME_VENDOR_ID, F_MESSAGES_SUPPORTED, F_NULL_VENDOR_ID, F_OOB_PROXYING_CONTROL, F_PUSH_PROXY_ACK, F_PUSH_PROXY_REQ, F_REPLY_NUMBER, F_SIMPP, F_SIMPP_REQ, F_STATISTICS, F_TCP_CONNECT_BACK, F_UDP_CONNECT_BACK, F_UDP_CONNECT_BACK_REDIR, F_UDP_HEAD_PING, F_UDP_HEAD_PONG, F_UPDATE_REQ, F_UPDATE_RESP, LENGTH_MINUS_PAYLOAD |
| Methods inherited from class com.limegroup.gnutella.messages.AbstractMessage |
compareTo, getCreationTime, getFunc, getGUID, getHandlerClass, getHops, getLength, getNetwork, getPriority, getTotalLength, getTTL, hop, isMulticast, isTCP, isUDP, isUnknownNetwork, makeGuid, repOk, setGUID, setHops, setPriority, setTTL, toString, updateLength, write, write, writeQuickly |
| Methods inherited from interface com.limegroup.gnutella.messages.Message |
getCreationTime, getFunc, getGUID, getHandlerClass, getHops, getLength, getNetwork, getPriority, getTotalLength, getTTL, hop, isMulticast, isTCP, isUDP, isUnknownNetwork, setHops, setPriority, setTTL, write, write, writeQuickly |
VERSION
public static final int VERSION
- See Also:
- Constant Field Values
MessagesSupportedVendorMessage
public MessagesSupportedVendorMessage()
- Constructor for creating the sole MSVM message of all our
supported messages.
supportsMessage
public int supportsMessage(byte[] vendorID,
int selector)
- Returns:
- -1 if the message isn't supported, else it returns the version
of the message supported.
supportsTCPConnectBack
public int supportsTCPConnectBack()
- Returns:
- -1 if the message isn't supported, else it returns the version
of the message supported.
supportsUDPConnectBack
public int supportsUDPConnectBack()
- Returns:
- -1 if the message isn't supported, else it returns the version
of the message supported.
supportsTCPConnectBackRedirect
public int supportsTCPConnectBackRedirect()
- Returns:
- -1 if the message isn't supported, else it returns the version
of the message supported.
supportsUDPConnectBackRedirect
public int supportsUDPConnectBackRedirect()
- Returns:
- -1 if the message isn't supported, else it returns the version
of the message supported.
supportsHopsFlow
public int supportsHopsFlow()
- Returns:
- -1 if the message isn't supported, else it returns the version
of the message supported.
supportsPushProxy
public int supportsPushProxy()
- Returns:
- -1 if the message isn't supported, else it returns the version
of the message supported.
supportsLeafGuidance
public int supportsLeafGuidance()
- Returns:
- -1 if the message isn't supported, else it returns the version
of the message supported.
supportsUDPCrawling
public int supportsUDPCrawling()
- Returns:
- -1 if the remote host does not support UDP crawling,
else it returns the version. TODO: Legacy reasons -- remove?
supportsHeaderUpdate
public int supportsHeaderUpdate()
- Returns:
- -1 if the remote host does not support header updates,
else returns the version
supportsOOBProxyingControl
public int supportsOOBProxyingControl()
supportsInspectionRequests
public int supportsInspectionRequests()
supportsDHTContacts
public int supportsDHTContacts()
- Returns:
- -1 if the remote host does DHT Conacts exchange,
else return the version
equals
public boolean equals(Object other)
- Overrides:
equals in class AbstractVendorMessage
- Returns:
- true if the two VMPs have identical signatures - no more, no
less. Does not take version into account, but if different versions
have different payloads, they'll differ.
hashCode
public int hashCode()
- Overrides:
hashCode in class AbstractVendorMessage
writePayload
protected void writePayload(OutputStream out)
throws IOException
- Overridden purely for stats handling.
- Overrides:
writePayload in class AbstractVendorMessage
- Throws:
IOException
Copyright © 2009. All Rights Reserved.