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
Modifier and TypeMethodDescriptionvoid
close()
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
void
start()
-
Method Details
-
start
void start() -
close
void close() -
isStarted
boolean isStarted() -
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
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.- Returns:
- true means the configuration is equivalent to the connector. false otherwise
-