public interface Connection
Modifier and Type | Method and Description |
---|---|
void |
checkFlushBatchBuffer()
Called periodically to flush any data in the batch buffer
|
void |
close()
Closes the connection.
|
ActiveMQBuffer |
createTransportBuffer(int size)
Create a new ActiveMQBuffer of the given size.
|
void |
fireReady(boolean ready) |
void |
forceClose()
This should close the internal channel without calling any listeners.
|
TransportConfiguration |
getConnectorConfig()
Generates a
TransportConfiguration to be used to connect to the same target this is
connected to. |
ActiveMQPrincipal |
getDefaultActiveMQPrincipal() |
Object |
getID()
returns the unique id of this wire.
|
String |
getLocalAddress()
Returns a string representation of the local address this connection is connected to.
|
RemotingConnection |
getProtocolConnection() |
String |
getRemoteAddress()
Returns a string representation of the remote address this connection is connected to.
|
boolean |
isUsingProtocolHandling()
the InVM Connection has some special handling as it doesn't use Netty ProtocolChannel
we will use this method Instead of using instanceof
|
boolean |
isWritable(ReadyListener listener) |
void |
setProtocolConnection(RemotingConnection connection) |
void |
write(ActiveMQBuffer buffer)
writes the buffer to the connection with no flushing or batching
|
void |
write(ActiveMQBuffer buffer,
boolean flush,
boolean batched)
writes the buffer to the connection and if flush is true returns only when the buffer has been physically written to the connection.
|
void |
write(ActiveMQBuffer buffer,
boolean flush,
boolean batched,
io.netty.channel.ChannelFutureListener futureListener)
writes the buffer to the connection and if flush is true returns only when the buffer has been physically written to the connection.
|
ActiveMQBuffer createTransportBuffer(int size)
size
- the size of buffer to createRemotingConnection getProtocolConnection()
void setProtocolConnection(RemotingConnection connection)
boolean isWritable(ReadyListener listener)
void fireReady(boolean ready)
Object getID()
void write(ActiveMQBuffer buffer, boolean flush, boolean batched)
buffer
- the buffer to writeflush
- whether to flush the buffers onto the wirebatched
- whether the packet is allowed to batched for better performancevoid write(ActiveMQBuffer buffer, boolean flush, boolean batched, io.netty.channel.ChannelFutureListener futureListener)
buffer
- the buffer to writeflush
- whether to flush the buffers onto the wirebatched
- whether the packet is allowed to batched for better performancevoid write(ActiveMQBuffer buffer)
buffer
- the buffer to writevoid forceClose()
void close()
String getRemoteAddress()
String getLocalAddress()
void checkFlushBatchBuffer()
TransportConfiguration getConnectorConfig()
TransportConfiguration
to be used to connect to the same target this is
connected to.ActiveMQPrincipal getDefaultActiveMQPrincipal()
boolean isUsingProtocolHandling()
Copyright © 2016 JBoss by Red Hat. All rights reserved.