Interface ConnectionHandler


  • public interface ConnectionHandler
    • Method Detail

      • newConnection

        SpineConnection newConnection​(java.lang.String address)
        Returns an open connection to the requested communication partner.
        Parameters:
        address - the address used in the communication protocol, i.e. not the SPINE device address. See getCommunicationAddress(java.lang.String)
        Returns:
        a connection to the requested device
      • getCommunicationAddress

        java.lang.String getCommunicationAddress​(java.lang.String deviceAddress)
        Returns the mapped communication address for the given SPINE device address.
        Parameters:
        deviceAddress - the device address used in SPINE
        Returns:
        the address used in the communication protocol
        Throws:
        java.util.NoSuchElementException - when no associated address is known
      • registerConnection

        void registerConnection​(SpineConnection connection)
        Register an open connection
        Parameters:
        connection - the connection that will be registered to be reused
      • addAddressMapping

        void addAddressMapping​(java.lang.String deviceAddress,
                               java.lang.String address)
        Associates the SPINE device address with the address used in the communication protocol.
        Parameters:
        deviceAddress - the device address used in SPINE
        address - the address used in the communication protocol
      • removeAddressMapping

        void removeAddressMapping​(java.lang.String address)
        Parameters:
        address - the address used in the communication protocol, i.e. not the SPINE device address.
      • closeConnection

        void closeConnection​(java.lang.String address)
        Parameters:
        address - the address used in the communication protocol, i.e. not the device address. See getCommunicationAddress.