Interface RemotingService
-
- All Known Implementing Classes:
RemotingServiceImpl
public interface RemotingService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddConnectionEntry(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.AcceptorcreateAcceptor(String name, String uri)AcceptorcreateAcceptor(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).AcceptorgetAcceptor(String name)Returns the acceptor identified by itsnameornullif it does not exists.Map<String,Acceptor>getAcceptors()default intgetConnectionCount()ReusableLatchgetConnectionCountLatch()Set<RemotingConnection>getConnections()List<BaseInterceptor>getIncomingInterceptors()List<BaseInterceptor>getOutgoinInterceptors()Map<String,ProtocolManagerFactory>getProtocolFactoryMap()longgetTotalConnectionCount()booleanisPaused()Pauses the acceptors so that no more connections can be made to the serverbooleanisStarted()voidloadProtocolServices(List<ActiveMQComponent> protocolServices)voidpauseAcceptors()Pauses the acceptors so that no more connections can be made to the serverRemotingConnectionremoveConnection(Object remotingConnectionID)Remove a connection from the connections held by the remoting service.booleanremoveIncomingInterceptor(BaseInterceptor interceptor)booleanremoveOutgoingInterceptor(BaseInterceptor interceptor)voidstart()voidstartAcceptors()voidstop(boolean criticalError)
-
-
-
Method Detail
-
removeConnection
RemotingConnection removeConnection(Object remotingConnectionID)
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
-
getConnections
Set<RemotingConnection> getConnections()
-
getConnectionCount
default int getConnectionCount()
- 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.
-
getConnectionCountLatch
ReusableLatch getConnectionCountLatch()
-
addIncomingInterceptor
void addIncomingInterceptor(BaseInterceptor interceptor)
-
getIncomingInterceptors
List<BaseInterceptor> getIncomingInterceptors()
-
addOutgoingInterceptor
void addOutgoingInterceptor(BaseInterceptor interceptor)
-
getOutgoinInterceptors
List<BaseInterceptor> getOutgoinInterceptors()
-
removeIncomingInterceptor
boolean removeIncomingInterceptor(BaseInterceptor interceptor)
-
removeOutgoingInterceptor
boolean removeOutgoingInterceptor(BaseInterceptor interceptor)
-
isStarted
boolean isStarted()
-
getProtocolFactoryMap
Map<String,ProtocolManagerFactory> getProtocolFactoryMap()
-
allowInvmSecurityOverride
void allowInvmSecurityOverride(ActiveMQPrincipal principal)
Allow acceptors to use this as their default security Principal if applicable.Used by AS7 integration code.
- Parameters:
principal-
-
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
void freeze(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).- Parameters:
scaleDownNodeID-remotingConnection-
-
getAcceptor
Acceptor getAcceptor(String name)
Returns the acceptor identified by itsnameornullif it does not exists.- Parameters:
name- the name of the acceptor
-
createAcceptor
Acceptor createAcceptor(TransportConfiguration transportConfiguration)
-
loadProtocolServices
void loadProtocolServices(List<ActiveMQComponent> protocolServices)
-
addConnectionEntry
void addConnectionEntry(Connection connection, ConnectionEntry entry)
-
-