public class RemotingConnectionImpl extends AbstractRemotingConnection implements CoreRemotingConnection
closeListeners, creationTime, dataReceived, executor, failureListeners, transportConnection| Constructor and Description |
|---|
RemotingConnectionImpl(PacketDecoder packetDecoder,
Connection transportConnection,
long blockingCallTimeout,
long blockingCallFailoverTimeout,
List<Interceptor> incomingInterceptors,
List<Interceptor> outgoingInterceptors,
Executor connectionExecutor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
blockUntilWritable(int size,
long timeout) |
void |
bufferReceived(Object connectionID,
ActiveMQBuffer buffer)
called by the remoting connection when a buffer is received.
|
void |
destroy()
destroys this connection.
|
void |
disconnect(boolean criticalError)
Disconnect the connection, closing all channels
|
void |
disconnect(String scaleDownNodeID,
boolean criticalError)
Disconnect the connection, closing all channels
|
void |
endOfBatch(Object connectionID) |
void |
fail(ActiveMQException me,
String scaleDownTargetNodeID)
called when the underlying connection fails.
|
void |
flush()
flush all outstanding data from the connection.
|
long |
generateChannelID()
generate a unique (within this connection) channel id
|
long |
getBlockingCallFailoverTimeout()
Returns the current timeout for blocking calls
|
long |
getBlockingCallTimeout()
Returns the current timeout for blocking calls
|
Channel |
getChannel(long channelID,
int confWindowSize)
Returns the channel with the channel id specified.
|
int |
getChannelVersion()
The client protocol used on the communication.
|
ActiveMQPrincipal |
getDefaultActiveMQPrincipal()
Returns the default security principal
|
long |
getIDGeneratorSequence()
Returns the next id to be chosen.
|
List<Interceptor> |
getIncomingInterceptors() |
List<Interceptor> |
getOutgoingInterceptors() |
String |
getProtocolName()
Returns the name of the protocol for this Remoting Connection
|
Object |
getTransferLock()
Returns the transfer lock used when transferring connections.
|
String |
getTransportLocalAddress()
Returns a string representation of the local address this connection is connected to.
|
boolean |
isClient()
Returns whether or not the
RemotingConnection is a client |
boolean |
isDestroyed()
Returns true if this
RemotingConnection has been destroyed. |
boolean |
isSupportReconnect()
This will check if reconnects are supported on the protocol and configuration.
|
void |
killMessage(SimpleString nodeID)
if slow consumer is killed,send the msessage to client.
|
void |
putChannel(long channelID,
Channel channel)
add the channel with the specified channel id
|
protected void |
removeAllChannels() |
boolean |
removeChannel(long channelID)
remove the channel with the specified channel id
|
void |
scheduledFlush() |
void |
setChannelVersion(int clientVersion)
Sets the client protocol used on the communication.
|
void |
syncIDGeneratorSequence(long id)
Resets the id generator used to generate id's.
|
String |
toString() |
addCloseListener, addFailureListener, asyncFail, callClosingListeners, callFailureListeners, checkDataReceived, createTransportBuffer, fail, getAuditSubject, getClientID, getCreationTime, getFailureListeners, getID, getLocalAddress, getRemoteAddress, getSubject, getTransportConnection, isSupportsFlowControl, isWritable, removeCloseListener, removeCloseListeners, removeFailureListener, removeFailureListeners, setAuditSubject, setClientID, setCloseListeners, setFailureListenersclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisVersionBeforeAddressChange, isVersionBeforeAsyncResponseChange, isVersionNewFQQN, isVersionSupportConsumerPriorityaddCloseListener, addFailureListener, asyncFail, checkDataReceived, createTransportBuffer, fail, getAuditSubject, getClientID, getCreationTime, getFailureListeners, getID, getRemoteAddress, getSubject, getTransportConnection, isSameTarget, isSupportsFlowControl, isWritable, removeCloseListener, removeCloseListeners, removeFailureListener, removeFailureListeners, setAuditSubject, setClientID, setCloseListeners, setFailureListenerspublic RemotingConnectionImpl(PacketDecoder packetDecoder, Connection transportConnection, long blockingCallTimeout, long blockingCallFailoverTimeout, List<Interceptor> incomingInterceptors, List<Interceptor> outgoingInterceptors, Executor connectionExecutor)
public void scheduledFlush()
scheduledFlush in interface RemotingConnectionscheduledFlush in class AbstractRemotingConnectionpublic int getChannelVersion()
CoreRemotingConnectiongetChannelVersion in interface CoreRemotingConnectionpublic void setChannelVersion(int clientVersion)
CoreRemotingConnectionsetChannelVersion in interface CoreRemotingConnectionclientVersion - the channelVersion to setpublic Channel getChannel(long channelID, int confWindowSize)
CoreRemotingConnectionIf it does not exist create it with the confirmation window size.
getChannel in interface CoreRemotingConnectionchannelID - the channel idconfWindowSize - the confirmation window sizepublic boolean removeChannel(long channelID)
CoreRemotingConnectionremoveChannel in interface CoreRemotingConnectionchannelID - the channel idpublic void putChannel(long channelID,
Channel channel)
CoreRemotingConnectionputChannel in interface CoreRemotingConnectionchannelID - the channel idchannel - the channelpublic List<Interceptor> getIncomingInterceptors()
public List<Interceptor> getOutgoingInterceptors()
public void fail(ActiveMQException me, String scaleDownTargetNodeID)
RemotingConnectionfail in interface RemotingConnectionme - the exception that caused the failurescaleDownTargetNodeID - the ID of the node where scale down is targetedpublic void destroy()
RemotingConnectiondestroy in interface RemotingConnectionpublic boolean blockUntilWritable(int size,
long timeout)
blockUntilWritable in interface CoreRemotingConnectionsize - size we are trying to writepublic void disconnect(boolean criticalError)
RemotingConnectiondisconnect in interface RemotingConnectionpublic void disconnect(String scaleDownNodeID, boolean criticalError)
RemotingConnectiondisconnect in interface RemotingConnectionpublic long generateChannelID()
CoreRemotingConnectiongenerateChannelID in interface CoreRemotingConnectionpublic void syncIDGeneratorSequence(long id)
CoreRemotingConnectionsyncIDGeneratorSequence in interface CoreRemotingConnectionid - the first id to set it topublic long getIDGeneratorSequence()
CoreRemotingConnectiongetIDGeneratorSequence in interface CoreRemotingConnectionpublic Object getTransferLock()
CoreRemotingConnectiongetTransferLock in interface CoreRemotingConnectionpublic boolean isClient()
RemotingConnectionRemotingConnection is a clientisClient in interface RemotingConnectionpublic boolean isDestroyed()
RemotingConnectionRemotingConnection has been destroyed.isDestroyed in interface RemotingConnectionpublic long getBlockingCallTimeout()
CoreRemotingConnectiongetBlockingCallTimeout in interface CoreRemotingConnectionpublic long getBlockingCallFailoverTimeout()
CoreRemotingConnectiongetBlockingCallFailoverTimeout in interface CoreRemotingConnectionpublic void flush()
RemotingConnectionflush in interface RemotingConnectionpublic ActiveMQPrincipal getDefaultActiveMQPrincipal()
CoreRemotingConnectiongetDefaultActiveMQPrincipal in interface CoreRemotingConnectionpublic boolean isSupportReconnect()
RemotingConnectionisSupportReconnect in interface RemotingConnectionisSupportReconnect in class AbstractRemotingConnectionpublic String getProtocolName()
getProtocolName in interface RemotingConnectionpublic void bufferReceived(Object connectionID, ActiveMQBuffer buffer)
BufferHandlerbufferReceived in interface BufferHandlerbufferReceived in class AbstractRemotingConnectionconnectionID - the connection the buffer was received onbuffer - the buffer to decodepublic void endOfBatch(Object connectionID)
endOfBatch in interface BufferHandlerpublic String getTransportLocalAddress()
RemotingConnectiongetTransportLocalAddress in interface RemotingConnectionprotected void removeAllChannels()
public void killMessage(SimpleString nodeID)
RemotingConnectionkillMessage in interface RemotingConnectionCopyright © 2021 JBoss by Red Hat. All rights reserved.