public class ManagementRemotingConnection extends Object implements RemotingConnection
| Modifier and Type | Field and Description |
|---|---|
SessionCallback |
callback |
| Constructor and Description |
|---|
ManagementRemotingConnection() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCloseListener(CloseListener listener)
add a CloseListener.
|
void |
addFailureListener(FailureListener listener)
add a failure listener.
|
Future |
asyncFail(ActiveMQException me)
Same thing as fail, but using an executor.
|
void |
bufferReceived(Object connectionID,
ActiveMQBuffer buffer)
called by the remoting connection when a buffer is received.
|
boolean |
checkDataReceived()
returns true if any data has been received since the last time this method was called.
|
ActiveMQBuffer |
createTransportBuffer(int size)
creates a new ActiveMQBuffer of the specified size.
|
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)
called when the underlying connection fails.
|
void |
fail(ActiveMQException me,
String scaleDownTargetNodeID)
called when the underlying connection fails.
|
void |
flush()
flush all outstanding data from the connection.
|
Subject |
getAuditSubject() |
String |
getClientID()
Returns the Client ID associated with this connection
|
long |
getCreationTime()
Returns the creation time of the
RemotingConnection. |
List<FailureListener> |
getFailureListeners()
return all the failure listeners
|
Object |
getID()
Returns the unique id of the
RemotingConnection. |
String |
getProtocolName()
Returns the name of the protocol for this Remoting Connection
|
String |
getRemoteAddress()
returns a string representation of the remote address of this connection
|
Subject |
getSubject()
the possibly null identity associated with this connection
|
Connection |
getTransportConnection()
return the underlying Connection.
|
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.
|
boolean |
isSupportsFlowControl()
Return true if the protocol supports flow control.
|
boolean |
isWritable(ReadyListener callback) |
void |
killMessage(SimpleString nodeID)
if slow consumer is killed,send the msessage to client.
|
boolean |
removeCloseListener(CloseListener listener)
remove a Close Listener
|
List<CloseListener> |
removeCloseListeners() |
boolean |
removeFailureListener(FailureListener listener)
remove the failure listener
|
List<FailureListener> |
removeFailureListeners() |
void |
scheduledFlush() |
void |
setAuditSubject(Subject subject) |
void |
setClientID(String cID)
Sets the client ID associated with this connection
|
void |
setCloseListeners(List<CloseListener> listeners) |
void |
setFailureListeners(List<FailureListener> listeners)
set the failure listeners.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisSameTargetendOfBatchpublic SessionCallback callback
public Object getID()
RemotingConnectionRemotingConnection.getID in interface RemotingConnectionpublic long getCreationTime()
RemotingConnectionRemotingConnection.getCreationTime in interface RemotingConnectionpublic String getRemoteAddress()
RemotingConnectiongetRemoteAddress in interface RemotingConnectionpublic void scheduledFlush()
scheduledFlush in interface RemotingConnectionpublic void addFailureListener(FailureListener listener)
RemotingConnectionThe listener will be called in the event of connection failure.
addFailureListener in interface RemotingConnectionlistener - the listenerpublic boolean removeFailureListener(FailureListener listener)
RemotingConnectionremoveFailureListener in interface RemotingConnectionlistener - the lister to removepublic void addCloseListener(CloseListener listener)
RemotingConnectionThis will be called in the event of the connection being closed.
addCloseListener in interface RemotingConnectionlistener - the listener to addpublic boolean removeCloseListener(CloseListener listener)
RemotingConnectionremoveCloseListener in interface RemotingConnectionlistener - the listener to removepublic List<CloseListener> removeCloseListeners()
removeCloseListeners in interface RemotingConnectionpublic void setCloseListeners(List<CloseListener> listeners)
setCloseListeners in interface RemotingConnectionpublic List<FailureListener> getFailureListeners()
RemotingConnectiongetFailureListeners in interface RemotingConnectionpublic List<FailureListener> removeFailureListeners()
removeFailureListeners in interface RemotingConnectionpublic void setFailureListeners(List<FailureListener> listeners)
RemotingConnectionThese will be called in the event of the connection being closed. Any previously added listeners will be removed.
setFailureListeners in interface RemotingConnectionlisteners - the listeners to add.public ActiveMQBuffer createTransportBuffer(int size)
RemotingConnectioncreateTransportBuffer in interface RemotingConnectionsize - the size of buffer requiredpublic void fail(ActiveMQException me)
RemotingConnectionfail in interface RemotingConnectionme - the exception that caused the failurepublic Future asyncFail(ActiveMQException me)
RemotingConnectionasyncFail in interface RemotingConnectionpublic 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 Connection getTransportConnection()
RemotingConnectiongetTransportConnection in interface RemotingConnectionpublic boolean isClient()
RemotingConnectionRemotingConnection is a clientisClient in interface RemotingConnectionpublic boolean isDestroyed()
RemotingConnectionRemotingConnection has been destroyed.isDestroyed in interface RemotingConnectionpublic void disconnect(boolean criticalError)
RemotingConnectiondisconnect in interface RemotingConnectionpublic void disconnect(String scaleDownNodeID, boolean criticalError)
RemotingConnectiondisconnect in interface RemotingConnectionpublic boolean checkDataReceived()
RemotingConnectioncheckDataReceived in interface RemotingConnectionpublic void flush()
RemotingConnectionflush in interface RemotingConnectionpublic boolean isWritable(ReadyListener callback)
isWritable in interface RemotingConnectionpublic void killMessage(SimpleString nodeID)
RemotingConnectionkillMessage in interface RemotingConnectionpublic boolean isSupportReconnect()
RemotingConnectionisSupportReconnect in interface RemotingConnectionpublic boolean isSupportsFlowControl()
RemotingConnectionisSupportsFlowControl in interface RemotingConnectionpublic void setAuditSubject(Subject subject)
setAuditSubject in interface RemotingConnectionpublic Subject getAuditSubject()
getAuditSubject in interface RemotingConnectionpublic Subject getSubject()
RemotingConnectiongetSubject in interface RemotingConnectionpublic String getProtocolName()
RemotingConnectiongetProtocolName in interface RemotingConnectionpublic void setClientID(String cID)
RemotingConnectionsetClientID in interface RemotingConnectionpublic String getClientID()
RemotingConnectiongetClientID in interface RemotingConnectionpublic String getTransportLocalAddress()
RemotingConnectiongetTransportLocalAddress in interface RemotingConnectionpublic void bufferReceived(Object connectionID, ActiveMQBuffer buffer)
BufferHandlerbufferReceived in interface BufferHandlerconnectionID - the connection the buffer was received onbuffer - the buffer to decodeCopyright © 2021 JBoss by Red Hat. All rights reserved.