Class InVMConnector
java.lang.Object
org.apache.activemq.artemis.spi.core.remoting.AbstractConnector
org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnector
- All Implemented Interfaces:
Connector
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final OrderedExecutorFactorystatic booleanprotected final intstatic Stringstatic intFields inherited from class org.apache.activemq.artemis.spi.core.remoting.AbstractConnector
configuration -
Constructor Summary
ConstructorsConstructorDescriptionInVMConnector(Map<String, Object> configuration, BufferHandler handler, ClientConnectionLifeCycleListener listener, Executor closeExecutor, Executor threadPool, ClientProtocolManager protocolManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Create and return a connection from this connector.voiddisconnect(String connectionID) protected ConnectioninternalCreateConnection(BufferHandler handler, ClientConnectionLifeCycleListener listener, ArtemisExecutor serverExecutor) booleanisEquivalent(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.booleanstatic voidstatic voidvoidstart()
-
Field Details
-
INVM_CONNECTOR_TYPE
-
DEFAULT_CONFIG
-
failOnCreateConnection
public static volatile boolean failOnCreateConnection -
numberOfFailures
public static volatile int numberOfFailures -
id
protected final int id -
executorFactory
-
-
Constructor Details
-
InVMConnector
public InVMConnector(Map<String, Object> configuration, BufferHandler handler, ClientConnectionLifeCycleListener listener, Executor closeExecutor, Executor threadPool, ClientProtocolManager protocolManager)
-
-
Method Details
-
resetFailures
public static void resetFailures() -
resetThreadPool
public static void resetThreadPool() -
getAcceptor
-
close
public void close() -
isStarted
public boolean isStarted() -
createConnection
Description copied from interface:ConnectorCreate 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)
-
start
public void start() -
getHandler
-
disconnect
-
internalCreateConnection
protected Connection internalCreateConnection(BufferHandler handler, ClientConnectionLifeCycleListener listener, ArtemisExecutor serverExecutor) -
isEquivalent
Description copied from interface:ConnectorIf 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
-