net.rim.device.api.io.transport
Class TransportDescriptor

java.lang.Object
  extended by net.rim.device.api.io.transport.TransportDescriptor

public class TransportDescriptor
extends Object

This class encapsulates information related to a specific transport instance. It includes the transportType and identifiers for the corresponding ServiceRecord (if available) for the transport.

Instances of this class are obtained via the methods in TransportInfo (e.g. getTransportDescriptor())

See Also:
ServiceRecord, TransportInfo
Since:
BlackBerry API 5.0.0

Constructor Summary
TransportDescriptor(int transportType, ServiceRecord serviceRecord)
          Creates a TransportDescriptor for the specified transportType with the specified ServiceRecord.
 
Method Summary
 boolean equals(Object obj)
          Indicates whether some other TransportDescriptor is "equal to" this one.
 String getCid()
          Retrieves the CID of the ServiceRecord for the transport instance represented by this descriptor (if available)
 int getTransportType()
          Retrieves the transportType encapsulated by this descriptor
 String getUid()
          Retrieves the UID of the ServiceRecord for the transport instance represented by this descriptor (if available)
 void setCid(String cid)
          Sets the CID of the ServiceRecord for the transport instance represented by this descriptor (if available)
 void setTransportType(int transportType)
          Sets the transportType in the descriptor
 void setUid(String uid)
          Sets the UID of the ServiceRecord for the transport instance represented by this descriptor (if available)
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 



Constructor Detail

TransportDescriptor

public TransportDescriptor(int transportType,
                           ServiceRecord serviceRecord)
Creates a TransportDescriptor for the specified transportType with the specified ServiceRecord. Note: This constructor should not be used directly; instead, instances of this class are obtained via the methods in TransportInfo (e.g. getTrasnportDescriptor())

Parameters:
transportType - One of the TRANSPORT_* defined in TransportInfo
serviceRecord - The ServiceRecord for the specified transport.
Since:
BlackBerry API 5.0.0


Method Detail

getTransportType

public int getTransportType()
Retrieves the transportType encapsulated by this descriptor

Returns:
the transportType encapsulated by this descriptor
Since:
BlackBerry API 5.0.0

setTransportType

public void setTransportType(int transportType)
Sets the transportType in the descriptor

Parameters:
transportType - the transportType to set
Since:
BlackBerry API 5.0.0

getUid

public String getUid()
Retrieves the UID of the ServiceRecord for the transport instance represented by this descriptor (if available)

Returns:
a String representing the UID of the ServiceRecord for the transport instance represented by this descriptor; or null otherwise.
Since:
BlackBerry API 5.0.0

setUid

public void setUid(String uid)
Sets the UID of the ServiceRecord for the transport instance represented by this descriptor (if available)

Since:
BlackBerry API 5.0.0

getCid

public String getCid()
Retrieves the CID of the ServiceRecord for the transport instance represented by this descriptor (if available)

Returns:
a String representing the CID of the ServiceRecord for the transport instance represented by this descriptor; or null otherwise.
Since:
BlackBerry API 5.0.0

setCid

public void setCid(String cid)
Sets the CID of the ServiceRecord for the transport instance represented by this descriptor (if available)

Since:
BlackBerry API 5.0.0

equals

public boolean equals(Object obj)
Indicates whether some other TransportDescriptor is "equal to" this one.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this TransportDescriptor is the same as the obj argument; false otherwise.
See Also:
Boolean.hashCode(), Hashtable
Since:
BlackBerry API 7.0.0

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object
Returns:
a string representation of the object.
Since:
BlackBerry API 7.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal