| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
ConnectorImpl.ConnectorState |
| Modifier and Type | Field and Description |
|---|---|
private java.nio.channels.SocketChannel |
_channel |
private boolean |
_closed |
private Connection |
_connection |
private C |
_context |
private DriverImpl |
_driver |
private boolean |
_inputDone |
private java.nio.channels.SelectionKey |
_key |
private Listener<C> |
_listener |
private java.util.logging.Logger |
_logger |
private boolean |
_outputDone |
private boolean |
_readAllowed |
private boolean |
_selected |
private ConnectorImpl.ConnectorState |
_state |
private Transport |
_transport |
private static int |
DEFAULT_BUFFER_SIZE |
private static int |
readBufferSize |
private static int |
writeBufferSize |
| Constructor and Description |
|---|
ConnectorImpl(DriverImpl driver,
Listener<C> listener,
java.nio.channels.SocketChannel c,
C context,
java.nio.channels.SelectionKey key) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the socket used by the connector.
|
void |
destroy()
Destructor for the given connector.
|
Connection |
getConnection()
Access the AMQP Connection associated with the connector.
|
C |
getContext()
Access the application context that is associated with the connector.
|
Transport |
getTransport()
Access the Transport associated with the connector.
|
boolean |
isClosed()
Determine if the connector is closed.
|
Listener<C> |
listener()
Access the listener which opened this connector.
|
boolean |
process()
Handle any inbound data, outbound data, or timing events pending on
the connector.
|
private boolean |
read() |
Sasl |
sasl()
Access the Authentication and Security context of the connector.
|
(package private) void |
selected() |
void |
setConnection(Connection connection)
Assign the AMQP Connection associated with the connector.
|
void |
setContext(C context)
Assign a new application context to the connector.
|
java.lang.String |
toString() |
(package private) void |
unselected() |
private boolean |
write() |
private static int DEFAULT_BUFFER_SIZE
private static int readBufferSize
private static int writeBufferSize
private final DriverImpl _driver
private final java.nio.channels.SocketChannel _channel
private final java.util.logging.Logger _logger
private C _context
private Connection _connection
private Transport _transport
private java.nio.channels.SelectionKey _key
private ConnectorImpl.ConnectorState _state
private boolean _inputDone
private boolean _outputDone
private boolean _closed
private boolean _selected
private boolean _readAllowed
ConnectorImpl(DriverImpl driver, Listener<C> listener, java.nio.channels.SocketChannel c, C context, java.nio.channels.SelectionKey key)
void selected()
void unselected()
public boolean process()
throws java.io.IOException
Connectorprivate boolean read()
throws java.io.IOException
java.io.IOExceptionprivate boolean write()
throws java.io.IOException
java.io.IOExceptionpublic Listener<C> listener()
Connectorpublic Sasl sasl()
Connectorpublic Connection getConnection()
ConnectorgetConnection in interface Connector<C>public void setConnection(Connection connection)
ConnectorsetConnection in interface Connector<C>connection - the connection to associate with the connector.public Transport getTransport()
ConnectorgetTransport in interface Connector<C>public C getContext()
ConnectorgetContext in interface Connector<C>createConnector(String, int, Object) and
createConnector(java.nio.channels.SelectableChannel, Object).public void setContext(C context)
ConnectorsetContext in interface Connector<C>context - new application context to associate with the connectorpublic void close()
Connectorpublic boolean isClosed()
Connectorpublic void destroy()
Connectorpublic java.lang.String toString()
toString in class java.lang.Object