Class ConnectionException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ConnectionException
    extends javacard.framework.CardRuntimeException
    Exception class for the uicc.connection package.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static short CONNECTION_REFUSED
      Reason code to indicate that the connection has been refused by the remote entity: 7
      static short INVALID_HEADER_FIELD
      Reason code to indicate that invalid header fields set by application
      static short INVALID_PARAMETERS
      Reason code to indicate that the parameters are invalid: 8
      static short INVALID_STATE
      Reason code to indicate that the state of a connection or of a link does not correspond the requested action: 2
      static short OPERATION_NOT_ALLOWED
      Reason code to indicate that the requested operation is not allowed at this time: 6
      static short OUT_OF_DATA_BOUNDARIES
      Reason code to indicate that the requested action would cause access out of data: 5
      static short RESOURCE_NOT_AVAILABLE
      Reason code to indicate that there are insufficient resources on the UICC or on the terminal (e.g.
      static short SCP81_KEY_NOT_FOUND
      Reason code to indicate that no SCP81 key could be found to establish the TLS session: 11
      static short TIME_OUT
      Reason code to indicate that the requested action was aborted because of a timeout: 3
      static short TOOLKIT_RESOURCE_NOT_AVAILABLE
      Reason code to indicate that a proactive session is pending
      static short TRANSPORT_PROTOCOL_NOT_SUPPORTED
      Reason code to indicate that the transport protocol type is not supported: 0
      static short UNSUPPORTED_OPERATION
      Reason code to indicate that the terminal does not support the required mechanisms to perform the action: 9
      static short USER_CANCELLATION
      Reason code to indicate that the requested action was aborted by the user: 4
    • Constructor Summary

      Constructors 
      Constructor Description
      ConnectionException​(short sReason)
      Construct a ConnectionException instance with the specified reason.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void throwIt​(short sReason)
      Throws the JCRE instance of the ConnectionException class with the specified reason.
      • Methods inherited from class javacard.framework.CardRuntimeException

        getReason, setReason
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • TRANSPORT_PROTOCOL_NOT_SUPPORTED

        public static final short TRANSPORT_PROTOCOL_NOT_SUPPORTED
        Reason code to indicate that the transport protocol type is not supported: 0
        See Also:
        Constant Field Values
      • TOOLKIT_RESOURCE_NOT_AVAILABLE

        public static final short TOOLKIT_RESOURCE_NOT_AVAILABLE
        Reason code to indicate that a proactive session is pending
        See Also:
        Constant Field Values
      • INVALID_STATE

        public static final short INVALID_STATE
        Reason code to indicate that the state of a connection or of a link does not correspond the requested action: 2
        See Also:
        Constant Field Values
      • TIME_OUT

        public static final short TIME_OUT
        Reason code to indicate that the requested action was aborted because of a timeout: 3
        See Also:
        Constant Field Values
      • USER_CANCELLATION

        public static final short USER_CANCELLATION
        Reason code to indicate that the requested action was aborted by the user: 4
        See Also:
        Constant Field Values
      • OUT_OF_DATA_BOUNDARIES

        public static final short OUT_OF_DATA_BOUNDARIES
        Reason code to indicate that the requested action would cause access out of data: 5
        See Also:
        Constant Field Values
      • OPERATION_NOT_ALLOWED

        public static final short OPERATION_NOT_ALLOWED
        Reason code to indicate that the requested operation is not allowed at this time: 6
        See Also:
        Constant Field Values
      • CONNECTION_REFUSED

        public static final short CONNECTION_REFUSED
        Reason code to indicate that the connection has been refused by the remote entity: 7
        See Also:
        Constant Field Values
      • INVALID_PARAMETERS

        public static final short INVALID_PARAMETERS
        Reason code to indicate that the parameters are invalid: 8
        See Also:
        Constant Field Values
      • UNSUPPORTED_OPERATION

        public static final short UNSUPPORTED_OPERATION
        Reason code to indicate that the terminal does not support the required mechanisms to perform the action: 9
        See Also:
        Constant Field Values
      • RESOURCE_NOT_AVAILABLE

        public static final short RESOURCE_NOT_AVAILABLE
        Reason code to indicate that there are insufficient resources on the UICC or on the terminal (e.g. timers:) 10
        See Also:
        Constant Field Values
      • SCP81_KEY_NOT_FOUND

        public static final short SCP81_KEY_NOT_FOUND
        Reason code to indicate that no SCP81 key could be found to establish the TLS session: 11
        See Also:
        Constant Field Values
      • INVALID_HEADER_FIELD

        public static final short INVALID_HEADER_FIELD
        Reason code to indicate that invalid header fields set by application
        See Also:
        Constant Field Values
    • Constructor Detail

      • ConnectionException

        public ConnectionException​(short sReason)
        Construct a ConnectionException instance with the specified reason. To conserve on resources use throwIt() method to re-use the JCRE instance of this class.
        Parameters:
        sReason - for the exception
    • Method Detail

      • throwIt

        public static void throwIt​(short sReason)
                            throws ConnectionException
        Throws the JCRE instance of the ConnectionException class with the specified reason.
        Parameters:
        sReason - for the exception.
        Throws:
        ConnectionException