public class RemotingServiceImpl extends Object implements RemotingService, ConnectionLifeCycleListener
| Modifier and Type | Field and Description |
|---|---|
static long |
CONNECTION_TTL_CHECK_INTERVAL |
| Constructor and Description |
|---|
RemotingServiceImpl(ClusterManager clusterManager,
Configuration config,
HornetQServer server,
ManagementService managementService,
ScheduledExecutorService scheduledThreadPool,
List<ProtocolManagerFactory> protocolManagerFactories) |
| Modifier and Type | Method and Description |
|---|---|
void |
addIncomingInterceptor(Interceptor interceptor) |
void |
addOutgoingInterceptor(Interceptor interceptor) |
void |
allowInvmSecurityOverride(HornetQPrincipal principal)
Allow acceptors to use this as their default security Principal if applicable.
|
void |
connectionCreated(HornetQComponent component,
Connection connection,
String protocol)
This method is used both by client connector creation and server connection creation through
acceptors.
|
void |
connectionDestroyed(Object connectionID)
Called when a connection is destroyed.
|
void |
connectionException(Object connectionID,
HornetQException me)
Called when an error occurs on the connection.
|
void |
connectionReadyForWrites(Object connectionID,
boolean ready) |
void |
freeze(CoreRemotingConnection connectionToKeepOpen)
Freezes and then disconnects all connections except the given one.
|
Set<RemotingConnection> |
getConnections() |
boolean |
isStarted() |
RemotingConnection |
removeConnection(Object remotingConnectionID)
Remove a connection from the connections held by the remoting service.
|
boolean |
removeIncomingInterceptor(Interceptor interceptor) |
boolean |
removeOutgoingInterceptor(Interceptor interceptor) |
void |
start() |
void |
stop(boolean criticalError) |
public static final long CONNECTION_TTL_CHECK_INTERVAL
public RemotingServiceImpl(ClusterManager clusterManager, Configuration config, HornetQServer server, ManagementService managementService, ScheduledExecutorService scheduledThreadPool, List<ProtocolManagerFactory> protocolManagerFactories)
public void start()
throws Exception
start in interface RemotingServiceExceptionpublic void allowInvmSecurityOverride(HornetQPrincipal principal)
RemotingServiceUsed by AS7 integration code.
allowInvmSecurityOverride in interface RemotingServicepublic void freeze(CoreRemotingConnection connectionToKeepOpen)
RemotingServicefreeze in interface RemotingServicepublic void stop(boolean criticalError)
throws Exception
stop in interface RemotingServiceExceptionpublic boolean isStarted()
isStarted in interface RemotingServicepublic RemotingConnection removeConnection(Object remotingConnectionID)
RemotingServiceremoveConnection in interface RemotingServiceremotingConnectionID - the ID of the RemotingConnection to removedpublic Set<RemotingConnection> getConnections()
getConnections in interface RemotingServicepublic void connectionCreated(HornetQComponent component, Connection connection, String protocol)
ConnectionLifeCycleListenercomponent parameter is normally passed as
null.
Leaving this method here and adding a different one at
ServerConnectionLifeCycleListener is a compromise for a reasonable split between the
hornetq-server and hornetq-client packages while avoiding to pull too much into hornetq-core.
The pivotal point keeping us from removing the method is ConnectorFactory and the
usage of it.
connectionCreated in interface ConnectionLifeCycleListenercomponent - This will probably be an Acceptor and only used on the server side.connection - the connection that has been createdprotocol - the messaging protocol type this connection usespublic void connectionDestroyed(Object connectionID)
ConnectionLifeCycleListenerconnectionDestroyed in interface ConnectionLifeCycleListenerconnectionID - the connection being destroyed.public void connectionException(Object connectionID, HornetQException me)
ConnectionLifeCycleListenerconnectionException in interface ConnectionLifeCycleListenerconnectionID - the id of the connection.me - the exception.public void connectionReadyForWrites(Object connectionID, boolean ready)
connectionReadyForWrites in interface ConnectionLifeCycleListenerpublic void addIncomingInterceptor(Interceptor interceptor)
addIncomingInterceptor in interface RemotingServicepublic boolean removeIncomingInterceptor(Interceptor interceptor)
removeIncomingInterceptor in interface RemotingServicepublic void addOutgoingInterceptor(Interceptor interceptor)
addOutgoingInterceptor in interface RemotingServicepublic boolean removeOutgoingInterceptor(Interceptor interceptor)
removeOutgoingInterceptor in interface RemotingServiceCopyright © 2013 JBoss, a division of Red Hat. All rights reserved.