Class ConnectionImpl
- java.lang.Object
-
- org.apache.qpid.proton.engine.impl.EndpointImpl
-
- org.apache.qpid.proton.engine.impl.ConnectionImpl
-
- All Implemented Interfaces:
Connection,Endpoint,Extendable,ProtonJConnection,ProtonJEndpoint,ReactorChild
public class ConnectionImpl extends EndpointImpl implements ProtonJConnection
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.qpid.proton.engine.Connection
Connection.Factory
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_CHANNELS
-
Constructor Summary
Constructors Constructor Description ConnectionImpl()Application code should useConnection.Factory.create()instead.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.qpid.proton.engine.impl.LinkNode<LinkImpl>addLinkEndpoint(LinkImpl endpoint)protected org.apache.qpid.proton.engine.impl.LinkNode<SessionImpl>addSessionEndpoint(SessionImpl endpoint)voidcollect(Collector collector)protected ConnectionImplgetConnectionImpl()java.lang.StringgetContainer()java.lang.ObjectgetContext()java.lang.StringgetHostname()java.lang.StringgetLocalContainerId()intgetMaxChannels()ReactorgetReactor()java.lang.StringgetRemoteContainer()Symbol[]getRemoteDesiredCapabilities()java.lang.StringgetRemoteHostname()Symbol[]getRemoteOfferedCapabilities()java.util.Map<Symbol,java.lang.Object>getRemoteProperties()TransportImplgetTransport()DeliveryImplgetWorkHead()Returns the head of the delivery work list.java.util.Iterator<DeliveryImpl>getWorkSequence()LinklinkHead(java.util.EnumSet<EndpointState> local, java.util.EnumSet<EndpointState> remote)Returns the head of the list of links in the specified states.voidremoveTransportWork(DeliveryImpl delivery)SessionImplsession()Returns a newly created session TODO does the Connection's channel-max property limit how many sessions can be created, or opened, or neither?SessionsessionHead(java.util.EnumSet<EndpointState> local, java.util.EnumSet<EndpointState> remote)Returns the head of the list of sessions in the specified states.voidsetContainer(java.lang.String container)voidsetContext(java.lang.Object context)Sets an arbitrary an application owned object on the end-point.voidsetDesiredCapabilities(Symbol[] capabilities)voidsetHostname(java.lang.String hostname)Set the name of the host (either fully qualified or relative) to which this connection is connecting to.voidsetLocalContainerId(java.lang.String localContainerId)voidsetOfferedCapabilities(Symbol[] capabilities)voidsetProperties(java.util.Map<Symbol,java.lang.Object> properties)voidsetReactor(Reactor reactor)-
Methods inherited from class org.apache.qpid.proton.engine.impl.EndpointImpl
attachments, close, free, getCondition, getLocalState, getRemoteCondition, getRemoteState, open, setCondition
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
-
-
-
-
Field Detail
-
MAX_CHANNELS
public static final int MAX_CHANNELS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConnectionImpl
public ConnectionImpl()
Application code should useConnection.Factory.create()instead.
-
-
Method Detail
-
session
public SessionImpl session()
Description copied from interface:ConnectionReturns a newly created session TODO does the Connection's channel-max property limit how many sessions can be created, or opened, or neither?- Specified by:
sessionin interfaceConnection- Specified by:
sessionin interfaceProtonJConnection
-
addSessionEndpoint
protected org.apache.qpid.proton.engine.impl.LinkNode<SessionImpl> addSessionEndpoint(SessionImpl endpoint)
-
addLinkEndpoint
protected org.apache.qpid.proton.engine.impl.LinkNode<LinkImpl> addLinkEndpoint(LinkImpl endpoint)
-
sessionHead
public Session sessionHead(java.util.EnumSet<EndpointState> local, java.util.EnumSet<EndpointState> remote)
Description copied from interface:ConnectionReturns 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?- Specified by:
sessionHeadin interfaceConnection- See Also:
Session.next(EnumSet, EnumSet)
-
linkHead
public Link linkHead(java.util.EnumSet<EndpointState> local, java.util.EnumSet<EndpointState> remote)
Description copied from interface:ConnectionReturns 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.- Specified by:
linkHeadin interfaceConnection- See Also:
Link.next(EnumSet, EnumSet)
-
getConnectionImpl
protected ConnectionImpl getConnectionImpl()
- Specified by:
getConnectionImplin classEndpointImpl
-
getMaxChannels
public int getMaxChannels()
- Specified by:
getMaxChannelsin interfaceProtonJConnection
-
getLocalContainerId
public java.lang.String getLocalContainerId()
-
setLocalContainerId
public void setLocalContainerId(java.lang.String localContainerId)
- Specified by:
setLocalContainerIdin interfaceProtonJConnection
-
getWorkHead
public DeliveryImpl getWorkHead()
Description copied from interface:ConnectionReturns 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.- Specified by:
getWorkHeadin interfaceConnection- See Also:
Receiver.recv(byte[], int, int),Delivery.settle(),Delivery.getWorkNext()
-
setContainer
public void setContainer(java.lang.String container)
- Specified by:
setContainerin interfaceConnection
-
getContainer
public java.lang.String getContainer()
- Specified by:
getContainerin interfaceConnection
-
setHostname
public void setHostname(java.lang.String hostname)
Description copied from interface:ConnectionSet 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.- Specified by:
setHostnamein interfaceConnection- Parameters:
hostname- the RFC1035 compliant host name.
-
getRemoteContainer
public java.lang.String getRemoteContainer()
- Specified by:
getRemoteContainerin interfaceConnection
-
getRemoteHostname
public java.lang.String getRemoteHostname()
- Specified by:
getRemoteHostnamein interfaceConnection
-
setOfferedCapabilities
public void setOfferedCapabilities(Symbol[] capabilities)
- Specified by:
setOfferedCapabilitiesin interfaceConnection
-
setDesiredCapabilities
public void setDesiredCapabilities(Symbol[] capabilities)
- Specified by:
setDesiredCapabilitiesin interfaceConnection
-
getRemoteOfferedCapabilities
public Symbol[] getRemoteOfferedCapabilities()
- Specified by:
getRemoteOfferedCapabilitiesin interfaceConnection
-
getRemoteDesiredCapabilities
public Symbol[] getRemoteDesiredCapabilities()
- Specified by:
getRemoteDesiredCapabilitiesin interfaceConnection
-
setProperties
public void setProperties(java.util.Map<Symbol,java.lang.Object> properties)
- Specified by:
setPropertiesin interfaceConnection
-
getRemoteProperties
public java.util.Map<Symbol,java.lang.Object> getRemoteProperties()
- Specified by:
getRemotePropertiesin interfaceConnection
-
getHostname
public java.lang.String getHostname()
- Specified by:
getHostnamein interfaceConnection
-
getWorkSequence
public java.util.Iterator<DeliveryImpl> getWorkSequence()
-
getTransport
public TransportImpl getTransport()
- Specified by:
getTransportin interfaceConnection
-
removeTransportWork
public void removeTransportWork(DeliveryImpl delivery)
-
getContext
public java.lang.Object getContext()
- Specified by:
getContextin interfaceConnection- Specified by:
getContextin interfaceEndpoint- Overrides:
getContextin classEndpointImpl- See Also:
Endpoint.setContext(Object)
-
setContext
public void setContext(java.lang.Object context)
Description copied from interface:EndpointSets an arbitrary an application owned object on the end-point. This object is not used by Proton.- Specified by:
setContextin interfaceConnection- Specified by:
setContextin interfaceEndpoint- Overrides:
setContextin classEndpointImpl
-
collect
public void collect(Collector collector)
- Specified by:
collectin interfaceConnection
-
getReactor
public Reactor getReactor()
- Specified by:
getReactorin interfaceConnection
-
setReactor
public void setReactor(Reactor reactor)
-
-