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.
|
Future |
asyncFail(ActiveMQException me)
Same thing as fail, but using an executor.
|
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.
|
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. |
default boolean |
isSameTarget(TransportConfiguration... configs) |
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 |
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.
|
bufferReceived
Object getID()
RemotingConnection
.long getCreationTime()
RemotingConnection
.String getRemoteAddress()
void scheduledFlush()
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 failureFuture asyncFail(ActiveMQException me)
me
- void 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()
Subject getSubject()
String getProtocolName()
void setClientID(String cID)
String getClientID()
String getTransportLocalAddress()
default boolean isSameTarget(TransportConfiguration... configs)
Copyright © 2019 JBoss by Red Hat. All rights reserved.