org.apache.activemq.artemis.spi.core.remoting

## Interface Connector

- All Known Implementing Classes:
    AbstractConnector

      public interface Connector

  A Connector is used by the client for creating and controlling a connection.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` closes the connector
    `Connection` | `createConnection()` Create and return a connection from this connector.
    `boolean` | `isEquivalent(Map<String,Object> configuration)` If the configuration is equivalent to this connector, which means if the parameter configuration is used to create a connection to a target node, it will be the same node as of the connections made with this connector.
    `boolean` | `isStarted()` returns true if the connector is started, oterwise false.
    `void` | `start()` starts the connector

- - ### Method Detail

    - #### start

          void start()

      starts the connector

    - #### close

          void close()

      closes the connector

    - #### isStarted

          boolean isStarted()

      returns true if the connector is started, oterwise false.
      Returns:
        true if the connector is started

    - #### createConnection

          Connection createConnection()

      Create and return a connection from this connector.

      This method must NOT throw an exception if it fails to create the connection (e.g. network is not available), in this case it MUST return null

      Returns:
        The connection, or null if unable to create a connection (e.g. network is unavailable)

    - #### isEquivalent

          boolean isEquivalent(Map<String,Object> configuration)

      If the configuration is equivalent to this connector, which means if the parameter configuration is used to create a connection to a target node, it will be the same node as of the connections made with this connector.
      Parameters:
        `configuration` -
      Returns:
        true means the configuration is equivalent to the connector. false otherwise.

Copyright © 2020 The Apache Software Foundation. All rights reserved.