Package org.apache.qpid.proton.engine
Interface Connection
- All Superinterfaces:
Endpoint
,Extendable
,ReactorChild
- All Known Subinterfaces:
ProtonJConnection
- All Known Implementing Classes:
ConnectionImpl
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.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
Symbol[]
Symbol[]
Returns the head of the delivery work list.linkHead
(EnumSet<EndpointState> local, EnumSet<EndpointState> remote) Returns the head of the list of links in the specified states.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
(EnumSet<EndpointState> local, EnumSet<EndpointState> remote) Returns the head of the list of sessions in the specified states.void
setContainer
(String container) void
setContext
(Object context) Sets an arbitrary an application owned object on the end-point.void
setDesiredCapabilities
(Symbol[] capabilities) void
setHostname
(String hostname) Set the name of the host (either fully qualified or relative) to which this connection is connecting to.void
setOfferedCapabilities
(Symbol[] capabilities) void
setProperties
(Map<Symbol, Object> properties) Methods inherited from interface org.apache.qpid.proton.engine.Endpoint
close, free, getCondition, getLocalState, getRemoteCondition, getRemoteState, open, setCondition
Methods inherited from interface org.apache.qpid.proton.engine.Extendable
attachments
Methods inherited from interface org.apache.qpid.proton.reactor.ReactorChild
free
-
Method Details
-
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
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:
-
linkHead
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:
-
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:
-
setContainer
-
getContainer
String getContainer() -
setHostname
Set the name of the host (either fully qualified or relative) to which this connection is connecting to. This information may be used by the remote peer to determine the correct back-end service to connect the client to. This value will be sent in the Open performative. Note that it is illegal to set the hostname to a numeric IP address or include a port number.- Parameters:
hostname
- the RFC1035 compliant host name.
-
getHostname
String getHostname() -
getRemoteContainer
String getRemoteContainer() -
getRemoteHostname
String getRemoteHostname() -
setOfferedCapabilities
-
setDesiredCapabilities
-
getRemoteOfferedCapabilities
Symbol[] getRemoteOfferedCapabilities() -
getRemoteDesiredCapabilities
Symbol[] getRemoteDesiredCapabilities() -
getRemoteProperties
-
setProperties
-
getContext
Object getContext()- Specified by:
getContext
in interfaceEndpoint
- See Also:
-
setContext
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 interfaceEndpoint
-
collect
-
getTransport
Transport getTransport() -
getReactor
Reactor getReactor()
-