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,
Executor flushExecutor) |
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,
ProtocolType 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, Executor flushExecutor)
public void start() throws Exception
start
in interface RemotingService
Exception
public void allowInvmSecurityOverride(HornetQPrincipal principal)
RemotingService
Used by AS7 integration code.
allowInvmSecurityOverride
in interface RemotingService
public void freeze(CoreRemotingConnection connectionToKeepOpen)
RemotingService
freeze
in interface RemotingService
public void stop(boolean criticalError) throws Exception
stop
in interface RemotingService
Exception
public boolean isStarted()
isStarted
in interface RemotingService
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 void connectionCreated(HornetQComponent component, Connection connection, ProtocolType protocol)
ConnectionLifeCycleListener
component
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 ConnectionLifeCycleListener
component
- 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)
ConnectionLifeCycleListener
connectionDestroyed
in interface ConnectionLifeCycleListener
connectionID
- the connection being destroyed.public void connectionException(Object connectionID, HornetQException me)
ConnectionLifeCycleListener
connectionException
in interface ConnectionLifeCycleListener
connectionID
- the id of the connection.me
- the exception.public void connectionReadyForWrites(Object connectionID, boolean ready)
connectionReadyForWrites
in interface ConnectionLifeCycleListener
public void addIncomingInterceptor(Interceptor interceptor)
addIncomingInterceptor
in interface RemotingService
public boolean removeIncomingInterceptor(Interceptor interceptor)
removeIncomingInterceptor
in interface RemotingService
public void addOutgoingInterceptor(Interceptor interceptor)
addOutgoingInterceptor
in interface RemotingService
public boolean removeOutgoingInterceptor(Interceptor interceptor)
removeOutgoingInterceptor
in interface RemotingService
Copyright © 2018 JBoss by Red Hat. All rights reserved.