Interface RemotingService
- All Known Implementing Classes:
RemotingServiceImpl
public interface RemotingService
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddConnectionEntry(Connection connection, ConnectionEntry entry) voidaddIncomingInterceptor(BaseInterceptor interceptor) voidaddOutgoingInterceptor(BaseInterceptor interceptor) voidallowInvmSecurityOverride(ActiveMQPrincipal principal) Allow acceptors to use this as their default security Principal if applicable.createAcceptor(String name, String uri) createAcceptor(TransportConfiguration transportConfiguration) voiddestroyAcceptor(String name) voidfreeze(String scaleDownNodeID, CoreRemotingConnection remotingConnection) 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).getAcceptor(String name) Returns the acceptor identified by itsnameornullif it does not exists.getConnection(Object remotingConnectionID) default intReturns the number of clients connected to this server.longReturns the number of clients which have connected to this server since it was started.booleanisPaused()Pauses the acceptors so that no more connections can be made to the serverbooleanvoidloadProtocolServices(List<ActiveMQComponent> protocolServices) voidvoidPauses the acceptors so that no more connections can be made to the servervoidprepareStop(boolean criticalError, Set<RemotingConnection> ignoreConnections) The Prepare stop will close all the connections however it will use the one used by storage managerremoveConnection(Object remotingConnectionID) Remove a connection from the connections held by the remoting service.booleanremoveIncomingInterceptor(BaseInterceptor interceptor) booleanremoveOutgoingInterceptor(BaseInterceptor interceptor) voidstart()voidvoidstop(boolean criticalError) voidupdateProtocolServices(List<ActiveMQComponent> protocolServices) Provides an entry point for protocol services offered by this service instance to react to configuration updates.
-
Method Details
-
removeConnection
Remove a connection from the connections held by the remoting service. This method must be used only from the management API. RemotingConnections are removed from the remoting service when their connectionTTL is hit.- Parameters:
remotingConnectionID- the ID of the RemotingConnection to removed- Returns:
- the removed RemotingConnection
-
getConnection
-
getConnections
Set<RemotingConnection> getConnections() -
getConnectionCount
default int getConnectionCount()Returns the number of clients connected to this server.- Returns:
- the number of clients connected to this server
-
getTotalConnectionCount
long getTotalConnectionCount()Returns the number of clients which have connected to this server since it was started.- Returns:
- the number of clients which have connected to this server since it was started
-
getConnectionCountLatch
ReusableLatch getConnectionCountLatch() -
addIncomingInterceptor
-
getIncomingInterceptors
List<BaseInterceptor> getIncomingInterceptors() -
addOutgoingInterceptor
-
getOutgoinInterceptors
List<BaseInterceptor> getOutgoinInterceptors() -
removeIncomingInterceptor
-
removeOutgoingInterceptor
-
notifyStop
void notifyStop() -
prepareStop
The Prepare stop will close all the connections however it will use the one used by storage manager- Throws:
Exception
-
stop
- Throws:
Exception
-
start
- Throws:
Exception
-
startAcceptors
- Throws:
Exception
-
isStarted
boolean isStarted() -
getProtocolFactoryMap
Map<String,ProtocolManagerFactory> getProtocolFactoryMap() -
allowInvmSecurityOverride
Allow acceptors to use this as their default security Principal if applicable.Used by AS7 integration code.
-
pauseAcceptors
void pauseAcceptors()Pauses the acceptors so that no more connections can be made to the server -
isPaused
boolean isPaused()Pauses the acceptors so that no more connections can be made to the server -
freeze
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). -
getAcceptor
Returns the acceptor identified by itsnameornullif it does not exists.- Parameters:
name- the name of the acceptor- Returns:
- the acceptor identified by its
nameornullif it does not exists
-
getAcceptors
-
createAcceptor
- Throws:
Exception
-
createAcceptor
-
destroyAcceptor
- Throws:
Exception
-
loadProtocolServices
-
updateProtocolServices
Provides an entry point for protocol services offered by this service instance to react to configuration updates. If the service implementation does not have any managed services or its services do not respond to updates it can ignore this call. services added should be added to the provided protocolServices list, and any removed should be found and removed from the list.- Parameters:
protocolServices- The list of protocol services known to the broker.- Throws:
Exception- if an error is thrown during the services updates.
-
addConnectionEntry
-