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) |
| 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 |
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.
|
String |
getClientID() |
int |
getClientVersion()
The client protocol used on the communication.
|
ActiveMQPrincipal |
getDefaultActiveMQPrincipal()
Returns the default security principal
|
long |
getIDGeneratorSequence()
Returns the next id to be chosen.
|
Object |
getTransferLock()
Returns the transfer lock used when transferring connections.
|
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 |
setClientID(String cID) |
void |
setClientVersion(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, callClosingListeners, callFailureListeners, checkDataReceived, createTransportBuffer, fail, getCreationTime, getFailureListeners, getID, getLocalAddress, getRemoteAddress, getTransportConnection, isSupportsFlowControl, isWritable, removeCloseListener, removeCloseListeners, removeFailureListener, removeFailureListeners, setCloseListeners, setFailureListenersclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddCloseListener, addFailureListener, checkDataReceived, createTransportBuffer, fail, getCreationTime, getFailureListeners, getID, getRemoteAddress, getTransportConnection, isSupportsFlowControl, isWritable, removeCloseListener, removeCloseListeners, removeFailureListener, removeFailureListeners, setCloseListeners, setFailureListenerspublic RemotingConnectionImpl(PacketDecoder packetDecoder, Connection transportConnection, long blockingCallTimeout, long blockingCallFailoverTimeout, List<Interceptor> incomingInterceptors, List<Interceptor> outgoingInterceptors)
public int getClientVersion()
CoreRemotingConnectiongetClientVersion in interface CoreRemotingConnectionpublic void setClientVersion(int clientVersion)
CoreRemotingConnectionsetClientVersion in interface CoreRemotingConnectionclientVersion - the clientVersion 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 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 void bufferReceived(Object connectionID, ActiveMQBuffer buffer)
BufferHandlerbufferReceived in interface BufferHandlerbufferReceived in class AbstractRemotingConnectionconnectionID - the connection the buffer was received onbuffer - the buffer to decodeprotected void removeAllChannels()
public void setClientID(String cID)
public String getClientID()
public void killMessage(SimpleString nodeID)
RemotingConnectionkillMessage in interface RemotingConnectionCopyright © 2018 JBoss by Red Hat. All rights reserved.