public interface RemotingConnection extends BufferHandler
Modifier and Type | Method and Description |
---|---|
void |
addCloseListener(CloseListener listener)
add a CloseListener.
|
void |
addFailureListener(FailureListener listener)
add a failure listener.
|
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.
|
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 |
getRemoteAddress()
returns a string representation of the remote address of this connection
|
Connection |
getTransportConnection()
return the underlying Connection.
|
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 |
setCloseListeners(List<CloseListener> listeners) |
void |
setFailureListeners(List<FailureListener> listeners)
set the failure listeners.
|
bufferReceived
Object getID()
RemotingConnection
.long getCreationTime()
RemotingConnection
.String getRemoteAddress()
void addFailureListener(FailureListener listener)
The listener will be called in the event of connection failure.
listener
- the listenerboolean removeFailureListener(FailureListener listener)
listener
- the lister to removevoid addCloseListener(CloseListener listener)
This will be called in the event of the connection being closed.
listener
- the listener to addboolean removeCloseListener(CloseListener listener)
listener
- the listener to removeList<CloseListener> removeCloseListeners()
void setCloseListeners(List<CloseListener> listeners)
List<FailureListener> getFailureListeners()
List<FailureListener> removeFailureListeners()
void setFailureListeners(List<FailureListener> listeners)
These will be called in the event of the connection being closed. Any previously added listeners will be removed.
listeners
- the listeners to add.ActiveMQBuffer createTransportBuffer(int size)
size
- the size of buffer requiredvoid fail(ActiveMQException me)
me
- the exception that caused the failurevoid fail(ActiveMQException me, String scaleDownTargetNodeID)
me
- the exception that caused the failurescaleDownTargetNodeID
- the ID of the node where scale down is targetedvoid destroy()
Connection getTransportConnection()
boolean isClient()
RemotingConnection
is a clientboolean isDestroyed()
RemotingConnection
has been destroyed.void disconnect(boolean criticalError)
void disconnect(String scaleDownNodeID, boolean criticalError)
boolean checkDataReceived()
void flush()
boolean isWritable(ReadyListener callback)
void killMessage(SimpleString nodeID)
boolean isSupportReconnect()
boolean isSupportsFlowControl()
Copyright © 2017 JBoss by Red Hat. All rights reserved.