Class OpenException

  • All Implemented Interfaces:
    java.io.Serializable, org.refcodes.exception.ErrorCodeAccessor, org.refcodes.exception.Trap
    Direct Known Subclasses:
    OpenTimeoutException

    public class OpenException
    extends java.io.IOException
    implements org.refcodes.exception.Trap
    Thrown in case opening or accessing an open line (connection, junction, link) caused problems. Usually a method similar to Openable.open() throws such an exception.

    ATTENTION: This Exception does not provide a dedicated ConnectionAccessor as a LinkComponent does not necessary provide dedicated connection information, it may be hard wired to another software system's hot spot or similar with the option of opening or closing. In order to provide compatibility with the Java APIs, this exception extends the IOException. E.g. JAVA APIs throw an IOException upon close, the Closable mixin throws an exception OpenException upon failure which can be assigned to an IOException reference (e.g. caught as an IOException).

    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  OpenException.OpenRuntimeException
      Unchecked exception with the same semantics as the OpenException.
      • Nested classes/interfaces inherited from interface org.refcodes.exception.ErrorCodeAccessor

        org.refcodes.exception.ErrorCodeAccessor.ErrorCodeBuilder<B extends org.refcodes.exception.ErrorCodeAccessor.ErrorCodeBuilder<B>>, org.refcodes.exception.ErrorCodeAccessor.ErrorCodeMutator, org.refcodes.exception.ErrorCodeAccessor.ErrorCodeProperty
    • Constructor Summary

      Constructors 
      Constructor Description
      OpenException​(java.lang.String message)
      Instantiates a new open exception.
      OpenException​(java.lang.String aMessage, java.lang.String aErrorCode)
      Instantiates a new open exception.
      OpenException​(java.lang.String message, java.lang.Throwable cause)
      Instantiates a new open exception.
      OpenException​(java.lang.String aMessage, java.lang.Throwable aCause, java.lang.String aErrorCode)
      Instantiates a new open exception.
      OpenException​(java.lang.Throwable cause)
      Instantiates a new open exception.
      OpenException​(java.lang.Throwable aCause, java.lang.String aErrorCode)
      Instantiates a new open exception.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getErrorCode()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
    • Constructor Detail

      • OpenException

        public OpenException​(java.lang.String aMessage,
                             java.lang.String aErrorCode)
        Instantiates a new open exception.
        Parameters:
        aMessage - the message
        aErrorCode - the error code
      • OpenException

        public OpenException​(java.lang.String aMessage,
                             java.lang.Throwable aCause,
                             java.lang.String aErrorCode)
        Instantiates a new open exception.
        Parameters:
        aMessage - the message
        aCause - the cause
        aErrorCode - the error code
      • OpenException

        public OpenException​(java.lang.String message,
                             java.lang.Throwable cause)
        Instantiates a new open exception.
        Parameters:
        message - the message
        cause - the cause
      • OpenException

        public OpenException​(java.lang.String message)
        Instantiates a new open exception.
        Parameters:
        message - the message
      • OpenException

        public OpenException​(java.lang.Throwable aCause,
                             java.lang.String aErrorCode)
        Instantiates a new open exception.
        Parameters:
        aCause - the cause
        aErrorCode - the error code
      • OpenException

        public OpenException​(java.lang.Throwable cause)
        Instantiates a new open exception.
        Parameters:
        cause - the cause
    • Method Detail

      • getErrorCode

        public java.lang.String getErrorCode()
        Specified by:
        getErrorCode in interface org.refcodes.exception.ErrorCodeAccessor