Class Protocol

java.lang.Object
  extended byProtocol

public class Protocol
extends java.lang.Object

   
 Contains details about the recognized protocols in Fishnet
 


Field Summary
static int LINK_INFO_PKT
           
static int NAME_PKT
           
static int PING_PKT
           
static int PING_REPLY_PKT
           
static int TRANSPORT_PKT
           
 
Constructor Summary
Protocol()
           
 
Method Summary
static boolean isProtocolValid(int protocol)
          Tests if the given protocol is valid
static java.lang.String protocolToString(int protocol)
          Returns a string representation of the given protocol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PING_PKT

public static final int PING_PKT
See Also:
Constant Field Values

PING_REPLY_PKT

public static final int PING_REPLY_PKT
See Also:
Constant Field Values

LINK_INFO_PKT

public static final int LINK_INFO_PKT
See Also:
Constant Field Values

NAME_PKT

public static final int NAME_PKT
See Also:
Constant Field Values

TRANSPORT_PKT

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

Protocol

public Protocol()
Method Detail

isProtocolValid

public static boolean isProtocolValid(int protocol)
Tests if the given protocol is valid

Parameters:
protocol - The protocol to be checked
Returns:
True if protocol is valid, else false

protocolToString

public static java.lang.String protocolToString(int protocol)
Returns a string representation of the given protocol. Can be used for debugging

Parameters:
protocol - The protocol whose string representation is desired
Returns:
The string representation of the given protocol. "Unknown Protocol" if the protocol is not recognized