Package uicc.connection
Class ConnectionServer
- java.lang.Object
-
- uicc.connection.ConnectionServer
-
public class ConnectionServer extends java.lang.ObjectThisConnectionServerfactory class provides methods to create objects implementingConnection,BIPLinkandUICCTransportLink. orSCP81Connction.
Any object instanciated by theConnectionServeris a Permanent Entry Point Object.
-
-
Field Summary
Fields Modifier and Type Field Description static byteCAT_TPIndicating the usage of CAT_TP as transport protocol: 0
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BIPLinkcreateBIPLink(Connection oConnection, Observer oObserver)Returns an instance providing a connection service without any additional reliable protocol.static SCP81ConnectioncreateSCP81Connection(Observer oOserver)Returns an instance providing an SCP81 connection.static UICCTransportLinkcreateUICCTransportLink(byte bLinkType, Connection oConnection, Observer oObserver)Returns an instance providing a connection service which implements a reliable transport protocol.static ConnectiongetConnection()Returns 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 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.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 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 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:
java.lang.NullPointerException- ifbaConnectionParametersis equal tonulljava.lang.ArrayIndexOutOfBoundsException- ifsOffsetandsLengthare causing access outside ofbaConnectionParametersarray 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 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).
java.lang.NullPointerException- ifoConnectionoroObserveris equal tonulljava.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 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
java.lang.NullPointerException- ifoConnectionoroObserveris equal tonull
-
createSCP81Connection
public static SCP81Connection createSCP81Connection(Observer oOserver) throws java.lang.NullPointerException, ConnectionException
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.
java.lang.NullPointerException- ifoObserveris equal tonull
-
-