uicc.connection
Class ConnectionServer

java.lang.Object
  extended by uicc.connection.ConnectionServer

public class ConnectionServer
extends java.lang.Object

This ConnectionServer factory class provides methods to create objects implementing Connection, BIPLink and UICCTransportLink.
Any object instanciated by the ConnectionServer is a Permanent Entry Point Object.


Field Summary
static byte CAT_TP
          Indicating the usage of CAT_TP as transport protocol: 0
 
Method Summary
static BIPLink createBIPLink(Connection oConnection, Observer oObserver)
          Returns an instance providing a connection service without any additional reliable protocol.
static UICCTransportLink createUICCTransportLink(byte bLinkType, Connection oConnection, Observer oObserver)
          Returns an instance providing a connection service which implements a reliable transport protocol.
static Connection getConnection()
          Returns an instance providing a data link connection.
static Connection getConnection(byte[] baConnectionParameters, short sOffset, short sLength, boolean multiplexingAllowed)
          Returns an instance providing a data link connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CAT_TP

public static final byte CAT_TP
Indicating the usage of CAT_TP as transport protocol: 0

See Also:
Constant Field Values
Method Detail

getConnection

public static Connection getConnection()
Returns an instance providing a data link connection. This instance has to be configured by providing connection parameters before usage. The returned object is a Permanent Entry Point Object. Connection objects created by this methods implictly does not allow multiplexing.

Returns:
Connection instance or null if the connection resources are exceeded

getConnection

public static Connection getConnection(byte[] baConnectionParameters,
                                       short sOffset,
                                       short sLength,
                                       boolean multiplexingAllowed)
                                throws java.lang.ArrayIndexOutOfBoundsException,
                                       java.lang.NullPointerException
Returns an instance providing a data link connection. This instance is configured according to the provided connection parameters. The returned object is a Permanent Entry Point Object.

Parameters:
baConnectionParameters - the parameters to build up an OPEN CHANNEL command according to ETSI TS 102 223
sOffset - the offset to the parameters in the byte array
sLength - the length of the parameters
multiplexingAllowed - if true, indicates whether an already existing Connection with the same parameters can be returned, or if the newly created Connection object can be re-used by another entity. If false, an new Connection object is created.
Returns:
a Connection instance or null if the connection resources are exceeded
Throws:
java.lang.NullPointerException - if baConnectionParameters is equal to null
java.lang.ArrayIndexOutOfBoundsException - if sOffset and sLength are causing access outside of baConnectionParameters array bounds

createUICCTransportLink

public static UICCTransportLink createUICCTransportLink(byte bLinkType,
                                                        Connection oConnection,
                                                        Observer oObserver)
                                                 throws java.lang.ArrayIndexOutOfBoundsException,
                                                        ConnectionException,
                                                        java.lang.NullPointerException
Returns an instance providing a connection service which implements a reliable transport protocol. The returned object is a Permanent Entry Point Object.

Parameters:
bLinkType - the kind of reliable mechanism which shall be used for that link
oConnection - the connection to create the reliable link on
oObserver - the Observer to be used for notification about state changes
Returns:
a UICCTransportLink instance based on the delivered connection or null if the connection ressources are exceeded
Throws:
ConnectionException - with the following reason code:
  • TRANSPORT_PROTOCOL_NOT_SUPPORTEDif the requested transport protocol type bLinkType is not supported.
  • INVALID_PARAMETERS if oConnection is already in use and does not support multiplexing.
  • RESOURCE_NOT_AVAILABLE if there are not sufficient resources available (on the UICC or on the terminal).
java.lang.NullPointerException - if oConnection or oObserver is equal to null
java.lang.ArrayIndexOutOfBoundsException

createBIPLink

public static BIPLink createBIPLink(Connection oConnection,
                                    Observer oObserver)
                             throws ConnectionException,
                                    java.lang.NullPointerException
Returns an instance providing a connection service without any additional reliable protocol. The returned object is a Permanent Entry Point Object.

Parameters:
oConnection - the connection to create the reliable link on
oObserver - the Observer to be used for notification about state changes
Returns:
a BIPLink instance based on the delivered connection or null if the connection resources are exceeded
Throws:
ConnectionException - with the following reason code:
  • INVALID_PARAMETERS if oConnection is already in use or it supports multiplexing.
java.lang.NullPointerException - if oConnection or oObserver is equal to null