public class InVMConnection extends Object implements Connection
| Constructor and Description |
|---|
InVMConnection(int serverID,
BufferHandler handler,
ConnectionLifeCycleListener listener,
Executor executor) |
InVMConnection(int serverID,
String id,
BufferHandler handler,
ConnectionLifeCycleListener listener,
Executor executor) |
InVMConnection(int serverID,
String id,
BufferHandler handler,
ConnectionLifeCycleListener listener,
Executor executor,
HornetQPrincipal defaultHornetQPrincipal) |
| Modifier and Type | Method and Description |
|---|---|
void |
addReadyListener(ReadyListener listener) |
void |
checkFlushBatchBuffer()
Called periodically to flush any data in the batch buffer
|
void |
close()
Closes the connection.
|
HornetQBuffer |
createTransportBuffer(int size)
Create a new HornetQBuffer of the given size.
|
void |
forceClose()
This should close the internal channel without calling any listeners.
|
int |
getBatchingBufferSize() |
TransportConfiguration |
getConnectorConfig()
Generates a
TransportConfiguration to be used to connect to the same target this is
connected to. |
HornetQPrincipal |
getDefaultHornetQPrincipal() |
Executor |
getExecutor() |
Object |
getID()
returns the unique id of this wire.
|
String |
getRemoteAddress()
Returns a string representation of the remote address this connection is connected to.
|
void |
removeReadyListener(ReadyListener listener) |
static void |
setFlushEnabled(boolean enable) |
String |
toString() |
void |
write(HornetQBuffer buffer)
writes the buffer to the connection with no flushing or batching
|
void |
write(HornetQBuffer buffer,
boolean flush,
boolean batch)
writes the buffer to the connection and if flush is true returns only when the buffer has been physically written to the connection.
|
public InVMConnection(int serverID,
BufferHandler handler,
ConnectionLifeCycleListener listener,
Executor executor)
public InVMConnection(int serverID,
String id,
BufferHandler handler,
ConnectionLifeCycleListener listener,
Executor executor)
public InVMConnection(int serverID,
String id,
BufferHandler handler,
ConnectionLifeCycleListener listener,
Executor executor,
HornetQPrincipal defaultHornetQPrincipal)
public void forceClose()
ConnectionforceClose in interface Connectionpublic void close()
Connectionclose in interface Connectionpublic HornetQBuffer createTransportBuffer(int size)
ConnectioncreateTransportBuffer in interface Connectionsize - the size of buffer to createpublic Object getID()
ConnectiongetID in interface Connectionpublic void checkFlushBatchBuffer()
ConnectioncheckFlushBatchBuffer in interface Connectionpublic void write(HornetQBuffer buffer)
Connectionwrite in interface Connectionbuffer - the buffer to writepublic void write(HornetQBuffer buffer, boolean flush, boolean batch)
Connectionwrite in interface Connectionbuffer - the buffer to writeflush - whether to flush the buffers onto the wirebatch - whether the packet is allowed to batched for better performancepublic String getRemoteAddress()
ConnectiongetRemoteAddress in interface Connectionpublic int getBatchingBufferSize()
public void addReadyListener(ReadyListener listener)
addReadyListener in interface Connectionpublic void removeReadyListener(ReadyListener listener)
removeReadyListener in interface Connectionpublic HornetQPrincipal getDefaultHornetQPrincipal()
getDefaultHornetQPrincipal in interface Connectionpublic static void setFlushEnabled(boolean enable)
public Executor getExecutor()
public TransportConfiguration getConnectorConfig()
ConnectionTransportConfiguration to be used to connect to the same target this is
connected to.getConnectorConfig in interface ConnectionCopyright © 2016 JBoss, a division of Red Hat. All rights reserved.