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) |
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() |
protected PacketDecoder |
getPacketDecoder() |
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) |
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 ClientProtocolManagerpublic void setSessionFactory(ClientSessionFactory factory)
setSessionFactory in interface ClientProtocolManagerpublic ClientSessionFactory getSessionFactory()
getSessionFactory in interface ClientProtocolManagerpublic void addChannelHandlers(io.netty.channel.ChannelPipeline pipeline)
addChannelHandlers in interface ClientProtocolManagerpublic boolean waitOnLatch(long milliseconds)
throws InterruptedException
waitOnLatch in interface ClientProtocolManagerInterruptedExceptionpublic Channel getChannel0()
public RemotingConnection getCurrentConnection()
getCurrentConnection in interface ClientProtocolManagerpublic Channel getChannel1()
public Lock lockSessionCreation()
lockSessionCreation in interface ClientProtocolManagerpublic void stop()
ClientProtocolManagerstop in interface ClientProtocolManagerpublic boolean isAlive()
isAlive in interface ClientProtocolManagerpublic void ping(long connectionTTL)
ping in interface ClientProtocolManagerpublic void sendSubscribeTopology(boolean isServer)
sendSubscribeTopology in interface ClientProtocolManagerpublic 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 ClientProtocolManagerActiveMQExceptionpublic SessionContext createSessionContext(Version clientVersion, String name, String username, String password, boolean xa, boolean autoCommitSends, boolean autoCommitAcks, boolean preAcknowledge, int minLargeMessageSize, int confirmationWindowSize) throws ActiveMQException
ActiveMQExceptionprotected 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 ClientProtocolManagerpublic boolean checkForFailover(String liveNodeID) throws ActiveMQException
checkForFailover in interface ClientProtocolManagerActiveMQExceptionpublic RemotingConnection connect(Connection transportConnection, long callTimeout, long callFailoverTimeout, List<Interceptor> incomingInterceptors, List<Interceptor> outgoingInterceptors, TopologyResponseHandler topologyResponseHandler)
connect in interface ClientProtocolManagerprotected void sendHandshake(Connection transportConnection)
protected ClusterTopologyChangeMessage updateTransportConfiguration(ClusterTopologyChangeMessage topMessage)
protected PacketDecoder getPacketDecoder()
Copyright © 2018 JBoss by Red Hat. All rights reserved.