public class RemotingServiceImpl extends Object implements RemotingService, ServerConnectionLifeCycleListener
| Constructor and Description |
|---|
RemotingServiceImpl(ClusterManager clusterManager,
Configuration config,
ActiveMQServer server,
ManagementService managementService,
ScheduledExecutorService scheduledThreadPool,
List<ProtocolManagerFactory> protocolManagerFactories,
Executor flushExecutor,
ServiceRegistry serviceRegistry) |
| Modifier and Type | Method and Description |
|---|---|
void |
addIncomingInterceptor(org.apache.activemq.artemis.api.core.BaseInterceptor interceptor) |
void |
addOutgoingInterceptor(org.apache.activemq.artemis.api.core.BaseInterceptor interceptor) |
void |
allowInvmSecurityOverride(org.apache.activemq.artemis.core.security.ActiveMQPrincipal principal)
Allow acceptors to use this as their default security Principal if applicable.
|
void |
connectionCreated(org.apache.activemq.artemis.core.server.ActiveMQComponent component,
org.apache.activemq.artemis.spi.core.remoting.Connection connection,
ProtocolManager protocol) |
void |
connectionDestroyed(Object connectionID) |
void |
connectionException(Object connectionID,
org.apache.activemq.artemis.api.core.ActiveMQException me) |
void |
connectionReadyForWrites(Object connectionID,
boolean ready) |
Acceptor |
createAcceptor(String name,
String uri) |
Acceptor |
createAcceptor(org.apache.activemq.artemis.api.core.TransportConfiguration info) |
void |
destroyAcceptor(String name) |
void |
freeze(String scaleDownNodeID,
org.apache.activemq.artemis.core.protocol.core.CoreRemotingConnection connectionToKeepOpen)
Freezes and then disconnects all connections except the given one and tells the client where else
it might connect (only applicable if server is in a cluster and uses scaleDown-on-failover=true).
|
Acceptor |
getAcceptor(String name)
Returns the acceptor identified by its
name or null if it does not exists. |
org.apache.activemq.artemis.utils.ReusableLatch |
getConnectionCountLatch() |
org.apache.activemq.artemis.spi.core.protocol.ConnectionEntry |
getConnectionEntry(Object remotingConnectionID) |
Set<org.apache.activemq.artemis.spi.core.protocol.RemotingConnection> |
getConnections() |
List<org.apache.activemq.artemis.api.core.BaseInterceptor> |
getIncomingInterceptors() |
List<org.apache.activemq.artemis.api.core.BaseInterceptor> |
getOutgoinInterceptors() |
long |
getTotalConnectionCount() |
boolean |
isPaused()
Pauses the acceptors so that no more connections can be made to the server
|
boolean |
isStarted() |
void |
pauseAcceptors()
Pauses the acceptors so that no more connections can be made to the server
|
org.apache.activemq.artemis.spi.core.protocol.RemotingConnection |
removeConnection(Object remotingConnectionID)
Remove a connection from the connections held by the remoting service.
|
boolean |
removeIncomingInterceptor(org.apache.activemq.artemis.api.core.BaseInterceptor interceptor) |
boolean |
removeOutgoingInterceptor(org.apache.activemq.artemis.api.core.BaseInterceptor interceptor) |
void |
start() |
void |
startAcceptors() |
void |
stop(boolean criticalError) |
protected void |
updateProtocols() |
public RemotingServiceImpl(ClusterManager clusterManager, Configuration config, ActiveMQServer server, ManagementService managementService, ScheduledExecutorService scheduledThreadPool, List<ProtocolManagerFactory> protocolManagerFactories, Executor flushExecutor, ServiceRegistry serviceRegistry)
public void start()
throws Exception
start in interface RemotingServiceExceptionpublic Acceptor createAcceptor(String name, String uri) throws Exception
createAcceptor in interface RemotingServiceExceptionpublic Acceptor createAcceptor(org.apache.activemq.artemis.api.core.TransportConfiguration info)
createAcceptor in interface RemotingServicepublic void destroyAcceptor(String name) throws Exception
destroyAcceptor in interface RemotingServiceExceptionpublic void startAcceptors()
throws Exception
startAcceptors in interface RemotingServiceExceptionpublic void allowInvmSecurityOverride(org.apache.activemq.artemis.core.security.ActiveMQPrincipal principal)
RemotingServiceUsed by AS7 integration code.
allowInvmSecurityOverride in interface RemotingServicepublic void pauseAcceptors()
RemotingServicepauseAcceptors in interface RemotingServicepublic boolean isPaused()
RemotingServiceisPaused in interface RemotingServicepublic void freeze(String scaleDownNodeID, org.apache.activemq.artemis.core.protocol.core.CoreRemotingConnection connectionToKeepOpen)
RemotingServicefreeze in interface RemotingServicepublic void stop(boolean criticalError)
throws Exception
stop in interface RemotingServiceExceptionpublic Acceptor getAcceptor(String name)
RemotingServicename or null if it does not exists.getAcceptor in interface RemotingServicename - the name of the acceptorpublic boolean isStarted()
isStarted in interface RemotingServicepublic org.apache.activemq.artemis.spi.core.protocol.ConnectionEntry getConnectionEntry(Object remotingConnectionID)
public org.apache.activemq.artemis.spi.core.protocol.RemotingConnection removeConnection(Object remotingConnectionID)
RemotingServiceremoveConnection in interface RemotingServiceremotingConnectionID - the ID of the RemotingConnection to removedpublic Set<org.apache.activemq.artemis.spi.core.protocol.RemotingConnection> getConnections()
getConnections in interface RemotingServicepublic long getTotalConnectionCount()
getTotalConnectionCount in interface RemotingServicepublic org.apache.activemq.artemis.utils.ReusableLatch getConnectionCountLatch()
getConnectionCountLatch in interface RemotingServicepublic void connectionCreated(org.apache.activemq.artemis.core.server.ActiveMQComponent component,
org.apache.activemq.artemis.spi.core.remoting.Connection connection,
ProtocolManager protocol)
connectionCreated in interface org.apache.activemq.artemis.spi.core.remoting.BaseConnectionLifeCycleListener<ProtocolManager>public void connectionDestroyed(Object connectionID)
connectionDestroyed in interface org.apache.activemq.artemis.spi.core.remoting.BaseConnectionLifeCycleListener<ProtocolManager>public void connectionException(Object connectionID, org.apache.activemq.artemis.api.core.ActiveMQException me)
connectionException in interface org.apache.activemq.artemis.spi.core.remoting.BaseConnectionLifeCycleListener<ProtocolManager>public void connectionReadyForWrites(Object connectionID, boolean ready)
connectionReadyForWrites in interface org.apache.activemq.artemis.spi.core.remoting.BaseConnectionLifeCycleListener<ProtocolManager>public void addIncomingInterceptor(org.apache.activemq.artemis.api.core.BaseInterceptor interceptor)
addIncomingInterceptor in interface RemotingServicepublic List<org.apache.activemq.artemis.api.core.BaseInterceptor> getIncomingInterceptors()
getIncomingInterceptors in interface RemotingServicepublic boolean removeIncomingInterceptor(org.apache.activemq.artemis.api.core.BaseInterceptor interceptor)
removeIncomingInterceptor in interface RemotingServicepublic void addOutgoingInterceptor(org.apache.activemq.artemis.api.core.BaseInterceptor interceptor)
addOutgoingInterceptor in interface RemotingServicepublic List<org.apache.activemq.artemis.api.core.BaseInterceptor> getOutgoinInterceptors()
getOutgoinInterceptors in interface RemotingServicepublic boolean removeOutgoingInterceptor(org.apache.activemq.artemis.api.core.BaseInterceptor interceptor)
removeOutgoingInterceptor in interface RemotingServiceprotected void updateProtocols()
Copyright © 2023 The Apache Software Foundation. All rights reserved.