LimeWire Consolidated API

com.limegroup.gnutella.messages.vendor
Class MessagesSupportedVendorMessage

java.lang.Object
  extended by com.limegroup.gnutella.messages.AbstractMessage
      extended by com.limegroup.gnutella.messages.vendor.AbstractVendorMessage
          extended by 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).


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.limegroup.gnutella.messages.vendor.VendorMessage
VendorMessage.ControlMessage
 
Nested classes/interfaces inherited from interface com.limegroup.gnutella.messages.Message
Message.MessageCounter, Message.Network
 
Field Summary
static int VERSION
           
 
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
 
Fields inherited from interface com.limegroup.gnutella.messages.Message
F_PING, F_PING_REPLY, F_PUSH, F_QUERY, F_QUERY_REPLY, F_ROUTE_TABLE_UPDATE, F_UDP_CONNECTION, F_VENDOR_MESSAGE, F_VENDOR_MESSAGE_STABLE
 
Constructor Summary
MessagesSupportedVendorMessage()
          Constructor for creating the sole MSVM message of all our supported messages.
 
Method Summary
 boolean equals(Object other)
           
 int hashCode()
           
 int supportsDHTContacts()
           
 int supportsHeaderUpdate()
           
 int supportsHopsFlow()
           
 int supportsInspectionRequests()
           
 int supportsLeafGuidance()
           
 int supportsMessage(byte[] vendorID, int selector)
           
 int supportsOOBProxyingControl()
           
 int supportsPushProxy()
           
 int supportsTCPConnectBack()
           
 int supportsTCPConnectBackRedirect()
           
 int supportsUDPConnectBack()
           
 int supportsUDPConnectBackRedirect()
           
 int supportsUDPCrawling()
           
protected  void writePayload(OutputStream out)
          Overridden purely for stats handling.
 
Methods inherited from class com.limegroup.gnutella.messages.vendor.AbstractVendorMessage
getPayload, getVersion, writeVendorPayload
 
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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.limegroup.gnutella.messages.vendor.VendorMessage
getVersion
 
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
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

VERSION

public static final int VERSION
See Also:
Constant Field Values
Constructor Detail

MessagesSupportedVendorMessage

public MessagesSupportedVendorMessage()
Constructor for creating the sole MSVM message of all our supported messages.

Method Detail

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

LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.