Class AbstractConnection

  • All Implemented Interfaces:
    IConnection
    Direct Known Subclasses:
    InputConnection, OutputConnection

    public abstract class AbstractConnection
    extends java.lang.Object
    implements IConnection
    Abstract base class for connections. Connection code is called from connection users, i.e. active components, on their on thread. Calls from the connection handler occur on another thread so that these calls must be synchronized.
    • Field Detail

      • inited

        protected boolean inited
        Boolean flag if connection is inited, closing, closed.
      • closed

        protected boolean closed
      • closing

        protected boolean closing
      • id

        protected int id
        The connection id.
      • input

        protected boolean input
        The input flag.
      • ini

        protected boolean ini
        The initiator flag.
    • Method Detail

      • getConnectionId

        public int getConnectionId()
        Get the id.
        Specified by:
        getConnectionId in interface IConnection
        Returns:
        the id.
      • isInited

        public boolean isInited()
        Get the inited.
        Returns:
        the inited.
      • setInited

        public void setInited()
        Set the inited.
        Parameters:
        inited - The inited to set.
      • setClosing

        public void setClosing()
        Set the connection to closed.
      • setClosed

        public void setClosed()
        Set the connection to closed.
      • isClosing

        public boolean isClosing()
        Get the closed.
        Returns:
        The closed.
      • isClosed

        public boolean isClosed()
        Get the closed.
        Returns:
        The closed.
      • close

        public void close()
        Close the connection. Notifies the other side that the connection has been closed.
        Specified by:
        close in interface IConnection
      • isInitiatorSide

        public boolean isInitiatorSide()
        Test if this connection is the initiator side.
        Returns:
        True if is initiator.
      • isInputConnection

        public boolean isInputConnection()
        Test if this connection is an input connection.
        Returns:
        True if is initiator.
      • getNonFunctionalProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getNonFunctionalProperties()
        Get the non-functional properties of the connection.
        Specified by:
        getNonFunctionalProperties in interface IConnection