public class ProtonRemotingConnection extends Object implements RemotingConnection
| Constructor and Description |
|---|
ProtonRemotingConnection(Acceptor acceptorUsed,
Connection connection,
ProtonProtocolManager protonProtocolManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCloseListener(CloseListener listener)
add a CloseListener.
|
void |
addFailureListener(FailureListener listener)
add a failure listener.
|
void |
bufferReceived(Object connectionID,
HornetQBuffer 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.
|
HornetQBuffer |
createBuffer(int size)
creates a new HornetQBuffer of the specified size.
|
ServerMessageImpl |
createServerMessage() |
void |
destroy()
destroys this connection.
|
void |
disconnect(boolean criticalError)
Disconnect the connection, closing all channels
|
void |
fail(HornetQException me)
called when the underlying connection fails.
|
void |
flush()
flush all outstanding data from the connection.
|
long |
getCreationTime()
Returns the creation time of the
RemotingConnection. |
Object |
getDeliveryLock() |
List<FailureListener> |
getFailureListeners()
return all the failure listeners
|
Object |
getID()
Returns the unique id of the
RemotingConnection. |
String |
getLogin() |
String |
getPasscode() |
String |
getRemoteAddress()
returns a string representation of the remote address of this connection
|
Connection |
getTransportConnection()
return the underlying Connection.
|
void |
handleFrame(byte[] frame) |
boolean |
isClient()
Returns whether or not the
RemotingConnection is a client |
boolean |
isDestroyed()
Returns true if this
RemotingConnection has been destroyed. |
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) |
protected void |
setDataReceived() |
void |
setFailureListeners(List<FailureListener> listeners)
set the failure listeners.
|
public ProtonRemotingConnection(Acceptor acceptorUsed, Connection connection, ProtonProtocolManager protonProtocolManager)
public Object getID()
RemotingConnectionRemotingConnection.getID in interface RemotingConnectionpublic long getCreationTime()
RemotingConnectionRemotingConnection.getCreationTime in interface RemotingConnectionpublic String getRemoteAddress()
RemotingConnectiongetRemoteAddress in interface RemotingConnectionpublic void addFailureListener(FailureListener listener)
RemotingConnectionaddFailureListener in interface RemotingConnectionlistener - the listenerpublic boolean removeFailureListener(FailureListener listener)
RemotingConnectionremoveFailureListener in interface RemotingConnectionlistener - the lister to removepublic void addCloseListener(CloseListener listener)
RemotingConnectionaddCloseListener 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 List<FailureListener> removeFailureListeners()
removeFailureListeners in interface RemotingConnectionpublic void setCloseListeners(List<CloseListener> listeners)
setCloseListeners in interface RemotingConnectionpublic void setFailureListeners(List<FailureListener> listeners)
RemotingConnectionsetFailureListeners in interface RemotingConnectionlisteners - the listeners to add.public List<FailureListener> getFailureListeners()
RemotingConnectiongetFailureListeners in interface RemotingConnectionpublic HornetQBuffer createBuffer(int size)
RemotingConnectioncreateBuffer in interface RemotingConnectionsize - the size of buffer requiredpublic void fail(HornetQException me)
RemotingConnectionfail in interface RemotingConnectionme - the exception that caused the failurepublic 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 boolean checkDataReceived()
RemotingConnectioncheckDataReceived in interface RemotingConnectionpublic void flush()
RemotingConnectionflush in interface RemotingConnectionpublic void bufferReceived(Object connectionID, HornetQBuffer buffer)
BufferHandlerbufferReceived in interface BufferHandlerconnectionID - the connection the buffer was received onbuffer - the buffer to decodepublic String getLogin()
public String getPasscode()
public ServerMessageImpl createServerMessage()
protected void setDataReceived()
public void handleFrame(byte[] frame)
public Object getDeliveryLock()
Copyright © 2013 JBoss, a division of Red Hat. All rights reserved.