com.sun.sgs.impl.transport.tcp
Class TcpDescriptor

java.lang.Object
  extended by com.sun.sgs.impl.transport.tcp.TcpDescriptor
All Implemented Interfaces:
TransportDescriptor, Serializable

 class TcpDescriptor
extends Object
implements TransportDescriptor, Serializable

TCP transport descriptor.


Field Summary
(package private)  String hostName
           
(package private)  int listeningPort
           
 
Constructor Summary
TcpDescriptor(String hostName, int listeningPort)
          Constructor.
 
Method Summary
 byte[] getConnectionData()
          Return the transport specific connection data as a byte array.
 boolean supportsTransport(TransportDescriptor descriptor)
          Check if the specified transport is compatible with the transport this descriptor represents.
 String toString()
          Returns a string representation of this descriptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

hostName

final String hostName

listeningPort

final int listeningPort
Constructor Detail

TcpDescriptor

TcpDescriptor(String hostName,
              int listeningPort)
Constructor.

Parameters:
hostName - host name
listeningPort - port transport is listening on
Method Detail

supportsTransport

public boolean supportsTransport(TransportDescriptor descriptor)
Check if the specified transport is compatible with the transport this descriptor represents.

Specified by:
supportsTransport in interface TransportDescriptor
Parameters:
descriptor - to compare
Returns:
true if the specified descriptor represents a transport compatible with the transport this descriptor represents, and false otherwise

getConnectionData

public byte[] getConnectionData()
Return the transport specific connection data as a byte array. The data can be used by a client to connect to a server. Each transport should document the format of the data returned by this method. This method will return a byte array that contains the following data:

Specified by:
getConnectionData in interface TransportDescriptor
Returns:
the connection data

toString

public String toString()
Returns a string representation of this descriptor.

Overrides:
toString in class Object
Returns:
a string representation of this descriptor

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved