org.apache.qpid.proton.driver
Interface Connector<C>

Type Parameters:
C - application supplied context

public interface Connector<C>

Client API


Method Summary
 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.
 boolean isClosed()
          Determine if the connector is closed.
 Listener listener()
          Access the listener which opened this connector.
 void process()
          Service the given connector.
 Sasl sasl()
          Access the Authentication and Security context of the connector.
 void setConnection(Connection connection)
          Assign the AMQP Connection associated with the connector.
 void setContext(C context)
          Assign a new application context to the connector.
 

Method Detail

process

void process()
             throws IOException
Service the given connector. Handle any inbound data, outbound data, or timing events pending on the connector.

Throws:
IOException

listener

Listener listener()
Access the listener which opened this connector.

Returns:
the listener which created this connector, or NULL if the connector has no listener (e.g. an outbound client connection).

sasl

Sasl sasl()
Access the Authentication and Security context of the connector.

Returns:
the Authentication and Security context for the connector, or NULL if none.

getConnection

Connection getConnection()
Access the AMQP Connection associated with the connector.

Returns:
the connection context for the connector, or NULL if none.

setConnection

void setConnection(Connection connection)
Assign the AMQP Connection associated with the connector.

Parameters:
connection - the connection to associate with the connector.

getContext

C getContext()
Access the application context that is associated with the connector.

Returns:
the application context that was passed when creating this connector. See createConnector(String, int, Object) and createConnector(java.nio.channels.SelectableChannel, Object).

setContext

void setContext(C context)
Assign a new application context to the connector.

Parameters:
context - new application context to associate with the connector

close

void close()
Close the socket used by the connector.


isClosed

boolean isClosed()
Determine if the connector is closed.

Returns:
True if closed, otherwise false

destroy

void destroy()
Destructor for the given connector. Assumes the connector's socket has been closed prior to call.



Copyright © 2013 The Apache Software Foundation. All Rights Reserved.