org.apache.qpid.proton.engine
Interface Connection

All Superinterfaces:
Endpoint

public interface Connection
extends Endpoint

Maintains lists of sessions, links and deliveries in a state that is interesting to the application. These are exposed by returning the head of those lists via sessionHead(EnumSet, EnumSet), linkHead(EnumSet, EnumSet) getWorkHead() respectively.


Method Summary
 java.lang.Object getContext()
           
 java.lang.String getRemoteContainer()
           
 Symbol[] getRemoteDesiredCapabilities()
           
 java.lang.String getRemoteHostname()
           
 Symbol[] getRemoteOfferedCapabilities()
           
 java.util.Map<Symbol,java.lang.Object> getRemoteProperties()
           
 Delivery getWorkHead()
          Returns the head of the delivery work list.
 Link linkHead(java.util.EnumSet<EndpointState> local, java.util.EnumSet<EndpointState> remote)
          Returns the head of the list of links in the specified states.
 Session session()
          Returns a newly created session TODO does the Connection's channel-max property limit how many sessions can be created, or opened, or neither?
 Session sessionHead(java.util.EnumSet<EndpointState> local, java.util.EnumSet<EndpointState> remote)
          Returns the head of the list of sessions in the specified states.
 void setContainer(java.lang.String container)
           
 void setContext(java.lang.Object context)
          Sets an arbitrary an application owned object on the end-point.
 void setDesiredCapabilities(Symbol[] capabilities)
           
 void setHostname(java.lang.String hostname)
           
 void setOfferedCapabilities(Symbol[] capabilities)
           
 void setProperties(java.util.Map<Symbol,java.lang.Object> properties)
           
 
Methods inherited from interface org.apache.qpid.proton.engine.Endpoint
close, free, getCondition, getLocalState, getRemoteCondition, getRemoteState, open, setCondition
 

Method Detail

session

Session session()
Returns a newly created session TODO does the Connection's channel-max property limit how many sessions can be created, or opened, or neither?


sessionHead

Session sessionHead(java.util.EnumSet<EndpointState> local,
                    java.util.EnumSet<EndpointState> remote)
Returns the head of the list of sessions in the specified states. Typically used to discover sessions whose remote state has acquired particular values, e.g. sessions that have been remotely opened or closed. TODO what ordering guarantees on the returned "linked list" are provided?

See Also:
Session.next(EnumSet, EnumSet)

linkHead

Link linkHead(java.util.EnumSet<EndpointState> local,
              java.util.EnumSet<EndpointState> remote)
Returns the head of the list of links in the specified states. Typically used to discover links whose remote state has acquired particular values, e.g. links that have been remotely opened or closed.

See Also:
Link.next(EnumSet, EnumSet)

getWorkHead

Delivery getWorkHead()
Returns the head of the delivery work list. The delivery work list consists of unsettled deliveries whose state has been changed by the other container and not yet locally processed.

See Also:
Receiver.recv(byte[], int, int), Delivery.settle(), Delivery.getWorkNext()

setContainer

void setContainer(java.lang.String container)

setHostname

void setHostname(java.lang.String hostname)

getRemoteContainer

java.lang.String getRemoteContainer()

getRemoteHostname

java.lang.String getRemoteHostname()

setOfferedCapabilities

void setOfferedCapabilities(Symbol[] capabilities)

setDesiredCapabilities

void setDesiredCapabilities(Symbol[] capabilities)

getRemoteOfferedCapabilities

Symbol[] getRemoteOfferedCapabilities()

getRemoteDesiredCapabilities

Symbol[] getRemoteDesiredCapabilities()

getRemoteProperties

java.util.Map<Symbol,java.lang.Object> getRemoteProperties()

setProperties

void setProperties(java.util.Map<Symbol,java.lang.Object> properties)

getContext

java.lang.Object getContext()
Specified by:
getContext in interface Endpoint
See Also:
Endpoint.setContext(Object)

setContext

void setContext(java.lang.Object context)
Description copied from interface: Endpoint
Sets an arbitrary an application owned object on the end-point. This object is not used by Proton.

Specified by:
setContext in interface Endpoint