Package uicc.connection
Class ConnectionServer
java.lang.Object
uicc.connection.ConnectionServer
This
Any object instanciated by the
ConnectionServer factory class provides methods to create
objects implementing Connection, BIPLink and UICCTransportLink.
or SCP81Connction.Any object instanciated by the
ConnectionServer is a Permanent Entry Point Object.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byteIndicating the usage of CAT_TP as transport protocol: 0 -
Method Summary
Modifier and TypeMethodDescriptionstatic BIPLinkcreateBIPLink(Connection oConnection, Observer oObserver) Returns an instance providing a connection service without any additional reliable protocol.static SCP81ConnectioncreateSCP81Connection(Observer oObserver) Deprecated.static SCP8XConnectioncreateSCP8XConnection(Observer oObserver) Returns an instance providing an SCP8X connection.static UICCTransportLinkcreateUICCTransportLink(byte bLinkType, Connection oConnection, Observer oObserver) Returns an instance providing a connection service which implements a reliable transport protocol.static ConnectionReturns an instance providing a data link connection.static ConnectiongetConnection(byte[] baConnectionParameters, short sOffset, short sLength, boolean multiplexingAllowed) Returns an instance providing a data link connection.
-
Field Details
-
CAT_TP
public static final byte CAT_TPIndicating the usage of CAT_TP as transport protocol: 0- See Also:
-
-
Method Details
-
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.Connectionobjects created by this methods implictly does not allow multiplexing.- Returns:
Connectioninstance ornullif the connection resources are exceeded
-
getConnection
public static Connection getConnection(byte[] baConnectionParameters, short sOffset, short sLength, boolean multiplexingAllowed) throws ArrayIndexOutOfBoundsException, 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 223sOffset- the offset to the parameters in the byte arraysLength- the length of the parametersmultiplexingAllowed- iftrue, indicates whether an already existingConnectionwith the same parameters can be returned, or if the newly createdConnectionobject can be re-used by another entity. Iffalse, an newConnectionobject is created.- Returns:
- a
Connectioninstance ornullif the connection resources are exceeded - Throws:
NullPointerException- ifbaConnectionParametersis equal tonullArrayIndexOutOfBoundsException- ifsOffsetandsLengthare causing access outside ofbaConnectionParametersarray bounds
-
createUICCTransportLink
public static UICCTransportLink createUICCTransportLink(byte bLinkType, Connection oConnection, Observer oObserver) throws ArrayIndexOutOfBoundsException, ConnectionException, 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 linkoConnection- the connection to create the reliable link onoObserver- the Observer to be used for notification about state changes- Returns:
- a
UICCTransportLinkinstance based on the delivered connection ornullif the connection ressources are exceeded - Throws:
ConnectionException- with the following reason code:TRANSPORT_PROTOCOL_NOT_SUPPORTEDif the requested transport protocol typebLinkTypeis not supported.INVALID_PARAMETERSifoConnectionis already in use and does not support multiplexing.RESOURCE_NOT_AVAILABLEif there are not sufficient resources available (on the UICC or on the terminal).
NullPointerException- ifoConnectionoroObserveris equal tonullArrayIndexOutOfBoundsException
-
createBIPLink
public static BIPLink createBIPLink(Connection oConnection, Observer oObserver) throws ConnectionException, 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 onoObserver- the Observer to be used for notification about state changes- Returns:
- a
BIPLinkinstance based on the delivered connection ornullif the connection resources are exceeded - Throws:
ConnectionException- with the following reason code:INVALID_PARAMETERSifoConnectionis already in use or it supports multiplexing.TRANSPORT_PROTOCOL_NOT_SUPPORTEDif this type of connection is not supported
NullPointerException- ifoConnectionoroObserveris equal tonull
-
createSCP81Connection
public static SCP81Connection createSCP81Connection(Observer oObserver) throws NullPointerException, ConnectionException Deprecated.Returns an instance providing an SCP81 connection. The returned object is a Permanent Entry Point Object.- Parameters:
oObserver- the Observer to be used for notifications about state changes- Returns:
- a
SCP81Connectioninstance. - Throws:
ConnectionException- with the following reason code:TRANSPORT_PROTOCOL_NOT_SUPPORTEDif this type of connection is not supported.
NullPointerException- ifoObserveris equal tonull
-
createSCP8XConnection
public static SCP8XConnection createSCP8XConnection(Observer oObserver) throws NullPointerException, ConnectionException Returns an instance providing an SCP8X connection. The returned object is a Permanent Entry Point Object.- Parameters:
oObserver- the Observer to be used for notifications about state changes- Returns:
- a
SCP8XConnectioninstance. - Throws:
ConnectionException- with the following reason code:TRANSPORT_PROTOCOL_NOT_SUPPORTEDif this type of connection is not supported.
NullPointerException- ifoObserveris equal tonull
-