public class ActiveMQClientProtocolManager extends Object implements ClientProtocolManager
Modifier and Type | Field and Description |
---|---|
protected RemotingConnectionImpl |
connection |
protected TopologyResponseHandler |
topologyResponseHandler |
Constructor and Description |
---|
ActiveMQClientProtocolManager() |
Modifier and Type | Method and Description |
---|---|
void |
addChannelHandlers(io.netty.channel.ChannelPipeline pipeline) |
boolean |
checkForFailover(String liveNodeID) |
boolean |
cleanupBeforeFailover(ActiveMQException cause) |
RemotingConnection |
connect(Connection transportConnection,
long callTimeout,
long callFailoverTimeout,
List<Interceptor> incomingInterceptors,
List<Interceptor> outgoingInterceptors,
TopologyResponseHandler topologyResponseHandler) |
protected PacketDecoder |
createPacketDecoder() |
SessionContext |
createSessionContext(String name,
String username,
String password,
boolean xa,
boolean autoCommitSends,
boolean autoCommitAcks,
boolean preAcknowledge,
int minLargeMessageSize,
int confirmationWindowSize) |
SessionContext |
createSessionContext(Version clientVersion,
String name,
String username,
String password,
boolean xa,
boolean autoCommitSends,
boolean autoCommitAcks,
boolean preAcknowledge,
int minLargeMessageSize,
int confirmationWindowSize) |
Channel |
getChannel0() |
Channel |
getChannel1() |
RemotingConnection |
getCurrentConnection() |
String |
getName() |
ClientSessionFactory |
getSessionFactory() |
boolean |
isAlive() |
Lock |
lockSessionCreation() |
protected Packet |
newCreateSessionPacket(Version clientVersion,
String name,
String username,
String password,
boolean xa,
boolean autoCommitSends,
boolean autoCommitAcks,
boolean preAcknowledge,
int minLargeMessageSize,
int confirmationWindowSize,
long sessionChannelID) |
protected SessionContext |
newSessionContext(String name,
int confirmationWindowSize,
Channel sessionChannel,
CreateSessionResponseMessage response) |
void |
ping(long connectionTTL) |
protected void |
sendHandshake(Connection transportConnection) |
void |
sendSubscribeTopology(boolean isServer) |
ActiveMQClientProtocolManager |
setExecutor(Executor executor) |
void |
setSessionFactory(ClientSessionFactory factory) |
void |
stop()
This is to be called when a connection failed and we want to interrupt any communication.
|
protected ClusterTopologyChangeMessage |
updateTransportConfiguration(ClusterTopologyChangeMessage topMessage) |
boolean |
waitOnLatch(long milliseconds) |
protected volatile RemotingConnectionImpl connection
protected TopologyResponseHandler topologyResponseHandler
public String getName()
getName
in interface ClientProtocolManager
public void setSessionFactory(ClientSessionFactory factory)
setSessionFactory
in interface ClientProtocolManager
public ClientSessionFactory getSessionFactory()
getSessionFactory
in interface ClientProtocolManager
public void addChannelHandlers(io.netty.channel.ChannelPipeline pipeline)
addChannelHandlers
in interface ClientProtocolManager
public boolean waitOnLatch(long milliseconds) throws InterruptedException
waitOnLatch
in interface ClientProtocolManager
InterruptedException
public Channel getChannel0()
public RemotingConnection getCurrentConnection()
getCurrentConnection
in interface ClientProtocolManager
public Channel getChannel1()
public ActiveMQClientProtocolManager setExecutor(Executor executor)
setExecutor
in interface ClientProtocolManager
public Lock lockSessionCreation()
lockSessionCreation
in interface ClientProtocolManager
public void stop()
ClientProtocolManager
stop
in interface ClientProtocolManager
public boolean isAlive()
isAlive
in interface ClientProtocolManager
public void ping(long connectionTTL)
ping
in interface ClientProtocolManager
public void sendSubscribeTopology(boolean isServer)
sendSubscribeTopology
in interface ClientProtocolManager
public SessionContext createSessionContext(String name, String username, String password, boolean xa, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, int minLargeMessageSize, int confirmationWindowSize) throws ActiveMQException
createSessionContext
in interface ClientProtocolManager
ActiveMQException
public SessionContext createSessionContext(Version clientVersion, String name, String username, String password, boolean xa, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, int minLargeMessageSize, int confirmationWindowSize) throws ActiveMQException
ActiveMQException
protected Packet newCreateSessionPacket(Version clientVersion, String name, String username, String password, boolean xa, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, int minLargeMessageSize, int confirmationWindowSize, long sessionChannelID)
protected SessionContext newSessionContext(String name, int confirmationWindowSize, Channel sessionChannel, CreateSessionResponseMessage response)
public boolean cleanupBeforeFailover(ActiveMQException cause)
cleanupBeforeFailover
in interface ClientProtocolManager
public boolean checkForFailover(String liveNodeID) throws ActiveMQException
checkForFailover
in interface ClientProtocolManager
ActiveMQException
public RemotingConnection connect(Connection transportConnection, long callTimeout, long callFailoverTimeout, List<Interceptor> incomingInterceptors, List<Interceptor> outgoingInterceptors, TopologyResponseHandler topologyResponseHandler)
connect
in interface ClientProtocolManager
protected void sendHandshake(Connection transportConnection)
protected ClusterTopologyChangeMessage updateTransportConfiguration(ClusterTopologyChangeMessage topMessage)
protected PacketDecoder createPacketDecoder()
Copyright © 2021 JBoss by Red Hat. All rights reserved.