Package org.apache.qpid.proton.engine
Interface Connection
-
- All Superinterfaces:
Endpoint
,Extendable
,ReactorChild
- All Known Subinterfaces:
ProtonJConnection
- All Known Implementing Classes:
ConnectionImpl
public interface Connection extends Endpoint, ReactorChild
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 viasessionHead(EnumSet, EnumSet)
,linkHead(EnumSet, EnumSet)
getWorkHead()
respectively.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Connection.Factory
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
collect(Collector collector)
java.lang.String
getContainer()
java.lang.Object
getContext()
java.lang.String
getHostname()
Reactor
getReactor()
java.lang.String
getRemoteContainer()
Symbol[]
getRemoteDesiredCapabilities()
java.lang.String
getRemoteHostname()
Symbol[]
getRemoteOfferedCapabilities()
java.util.Map<Symbol,java.lang.Object>
getRemoteProperties()
Transport
getTransport()
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)
Set the name of the host (either fully qualified or relative) to which this connection is connecting to.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
-
Methods inherited from interface org.apache.qpid.proton.engine.Extendable
attachments
-
Methods inherited from interface org.apache.qpid.proton.reactor.ReactorChild
free
-
-
-
-
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.
-
setContainer
void setContainer(java.lang.String container)
-
getContainer
java.lang.String getContainer()
-
setHostname
void setHostname(java.lang.String hostname)
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
java.lang.String getHostname()
-
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 interfaceEndpoint
- 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 interfaceEndpoint
-
collect
void collect(Collector collector)
-
getTransport
Transport getTransport()
-
getReactor
Reactor getReactor()
-
-