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

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

public class ConnectionDescriptor
extends Object

This class stores information about a Connection opened by using a ConnectionFactory. It includes a Connection object, a TransportDescriptor that describes the transport over which the connection was opened, and the URL used to open it.

You create instances of this class by invoking ConnectionFactory methods that have a return type of ConnectionDescriptor.

You do not create instances of the class directly.

See Also:
ConnectionFactory, TransportDescriptor, Connection
Since:
BlackBerry API 5.0.0

Constructor Summary
ConnectionDescriptor(Connection connection, TransportDescriptor transportDescriptor, String url)
          Creates a ConnectionDescriptor with the specified connection, transport descriptor and url Note: This constructor should not be used directly; instead, instances of this class are obtained via the methods in ConnectionFactory
 
Method Summary
 Connection getConnection()
          Retrieves the connection encapsulated in this descriptor
 TransportDescriptor getTransportDescriptor()
          Retrieves the TransportDescriptor that represents the underlying transport for the connection
 String getUrl()
          Retrieves the url used to open the connection
 void setConnection(Connection connection)
           
 void setTransportDescriptor(TransportDescriptor transportDescriptor)
           
 void setUrl(String url)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

ConnectionDescriptor

public ConnectionDescriptor(Connection connection,
                            TransportDescriptor transportDescriptor,
                            String url)
Creates a ConnectionDescriptor with the specified connection, transport descriptor and url Note: This constructor should not be used directly; instead, instances of this class are obtained via the methods in ConnectionFactory

Parameters:
connection - a Connection obtained from a ConnectionFactory
transportDescriptor - a TransportDescriptor that represents the underlying transport for the connection
url - the String used to open the connection.
Since:
BlackBerry API 5.0.0


Method Detail

getConnection

public Connection getConnection()
Retrieves the connection encapsulated in this descriptor

Returns:
the connection
Since:
BlackBerry API 5.0.0

setConnection

public void setConnection(Connection connection)
Parameters:
connection - the connection to set
Since:
BlackBerry API 5.0.0

getTransportDescriptor

public TransportDescriptor getTransportDescriptor()
Retrieves the TransportDescriptor that represents the underlying transport for the connection

Returns:
the transportDescriptor
Since:
BlackBerry API 5.0.0

setTransportDescriptor

public void setTransportDescriptor(TransportDescriptor transportDescriptor)
Parameters:
transportDescriptor - the transportDescriptor to set
Since:
BlackBerry API 5.0.0

getUrl

public String getUrl()
Retrieves the url used to open the connection

Returns:
the url
Since:
BlackBerry API 5.0.0

setUrl

public void setUrl(String url)
Parameters:
url - the url to set
Since:
BlackBerry API 5.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.