Class ConnectionServer

java.lang.Object
uicc.connection.ConnectionServer

public class ConnectionServer extends Object
This 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 Details

    • CAT_TP

      public static final byte CAT_TP
      Indicating the usage of CAT_TP as transport protocol: 0
      See Also:
  • Method Details

    • 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 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 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:
      NullPointerException - if baConnectionParameters is equal to null
      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 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 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).
      NullPointerException - if oConnection or oObserver is equal to null
      ArrayIndexOutOfBoundsException
    • 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 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.
      • TRANSPORT_PROTOCOL_NOT_SUPPORTED if this type of connection is not supported
      NullPointerException - if oConnection or oObserver is equal to null
    • 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 SCP81Connection instance.
      Throws:
      ConnectionException - with the following reason code:
      • TRANSPORT_PROTOCOL_NOT_SUPPORTED if this type of connection is not supported.
      NullPointerException - ifoObserver is equal to null
    • 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 SCP8XConnection instance.
      Throws:
      ConnectionException - with the following reason code:
      • TRANSPORT_PROTOCOL_NOT_SUPPORTED if this type of connection is not supported.
      NullPointerException - ifoObserver is equal to null