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(BaseInterceptor interceptor) |
void |
addOutgoingInterceptor(BaseInterceptor interceptor) |
void |
allowInvmSecurityOverride(ActiveMQPrincipal principal)
Allow acceptors to use this as their default security Principal if applicable.
|
void |
connectionCreated(ActiveMQComponent component,
Connection connection,
ProtocolManager protocol) |
void |
connectionDestroyed(Object connectionID) |
void |
connectionException(Object connectionID,
ActiveMQException me) |
void |
connectionReadyForWrites(Object connectionID,
boolean ready) |
Acceptor |
createAcceptor(String name,
String uri) |
Acceptor |
createAcceptor(TransportConfiguration info) |
void |
destroyAcceptor(String name) |
void |
freeze(String scaleDownNodeID,
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. |
ReusableLatch |
getConnectionCountLatch() |
ConnectionEntry |
getConnectionEntry(Object remotingConnectionID) |
Set<RemotingConnection> |
getConnections() |
List<BaseInterceptor> |
getIncomingInterceptors() |
List<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
|
RemotingConnection |
removeConnection(Object remotingConnectionID)
Remove a connection from the connections held by the remoting service.
|
boolean |
removeIncomingInterceptor(BaseInterceptor interceptor) |
boolean |
removeOutgoingInterceptor(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 RemotingService
Exception
public Acceptor createAcceptor(String name, String uri) throws Exception
createAcceptor
in interface RemotingService
Exception
public Acceptor createAcceptor(TransportConfiguration info)
createAcceptor
in interface RemotingService
public void destroyAcceptor(String name) throws Exception
destroyAcceptor
in interface RemotingService
Exception
public void startAcceptors() throws Exception
startAcceptors
in interface RemotingService
Exception
public void allowInvmSecurityOverride(ActiveMQPrincipal principal)
RemotingService
Used by AS7 integration code.
allowInvmSecurityOverride
in interface RemotingService
public void pauseAcceptors()
RemotingService
pauseAcceptors
in interface RemotingService
public boolean isPaused()
RemotingService
isPaused
in interface RemotingService
public void freeze(String scaleDownNodeID, CoreRemotingConnection connectionToKeepOpen)
RemotingService
freeze
in interface RemotingService
public void stop(boolean criticalError) throws Exception
stop
in interface RemotingService
Exception
public Acceptor getAcceptor(String name)
RemotingService
name
or null
if it does not exists.getAcceptor
in interface RemotingService
name
- the name of the acceptorpublic boolean isStarted()
isStarted
in interface RemotingService
public ConnectionEntry getConnectionEntry(Object remotingConnectionID)
public RemotingConnection removeConnection(Object remotingConnectionID)
RemotingService
removeConnection
in interface RemotingService
remotingConnectionID
- the ID of the RemotingConnection to removedpublic Set<RemotingConnection> getConnections()
getConnections
in interface RemotingService
public long getTotalConnectionCount()
getTotalConnectionCount
in interface RemotingService
public ReusableLatch getConnectionCountLatch()
getConnectionCountLatch
in interface RemotingService
public void connectionCreated(ActiveMQComponent component, Connection connection, ProtocolManager protocol)
connectionCreated
in interface BaseConnectionLifeCycleListener<ProtocolManager>
public void connectionDestroyed(Object connectionID)
connectionDestroyed
in interface BaseConnectionLifeCycleListener<ProtocolManager>
public void connectionException(Object connectionID, ActiveMQException me)
connectionException
in interface BaseConnectionLifeCycleListener<ProtocolManager>
public void connectionReadyForWrites(Object connectionID, boolean ready)
connectionReadyForWrites
in interface BaseConnectionLifeCycleListener<ProtocolManager>
public void addIncomingInterceptor(BaseInterceptor interceptor)
addIncomingInterceptor
in interface RemotingService
public List<BaseInterceptor> getIncomingInterceptors()
getIncomingInterceptors
in interface RemotingService
public boolean removeIncomingInterceptor(BaseInterceptor interceptor)
removeIncomingInterceptor
in interface RemotingService
public void addOutgoingInterceptor(BaseInterceptor interceptor)
addOutgoingInterceptor
in interface RemotingService
public List<BaseInterceptor> getOutgoinInterceptors()
getOutgoinInterceptors
in interface RemotingService
public boolean removeOutgoingInterceptor(BaseInterceptor interceptor)
removeOutgoingInterceptor
in interface RemotingService
protected void updateProtocols()
Copyright © 2018 The Apache Software Foundation. All Rights Reserved.