public class ConnectionImpl extends EndpointImpl implements ProtonJConnection
Connection.Factory
Modifier and Type | Field and Description |
---|---|
static int |
MAX_CHANNELS |
Constructor and Description |
---|
ConnectionImpl()
Application code should use
Connection.Factory.create() instead. |
Modifier and Type | Method and 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) |
void |
collect(Collector collector) |
protected ConnectionImpl |
getConnectionImpl() |
java.lang.String |
getContainer() |
java.lang.Object |
getContext() |
java.lang.String |
getHostname() |
java.lang.String |
getLocalContainerId() |
int |
getMaxChannels() |
Reactor |
getReactor() |
java.lang.String |
getRemoteContainer() |
Symbol[] |
getRemoteDesiredCapabilities() |
java.lang.String |
getRemoteHostname() |
Symbol[] |
getRemoteOfferedCapabilities() |
java.util.Map<Symbol,java.lang.Object> |
getRemoteProperties() |
TransportImpl |
getTransport() |
DeliveryImpl |
getWorkHead()
Returns the head of the delivery work list.
|
java.util.Iterator<DeliveryImpl> |
getWorkSequence() |
Link |
linkHead(java.util.EnumSet<EndpointState> local,
java.util.EnumSet<EndpointState> remote)
Returns the head of the list of links in the specified states.
|
void |
removeTransportWork(DeliveryImpl delivery) |
SessionImpl |
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 |
setLocalContainerId(java.lang.String localContainerId) |
void |
setOfferedCapabilities(Symbol[] capabilities) |
void |
setProperties(java.util.Map<Symbol,java.lang.Object> properties) |
void |
setReactor(Reactor reactor) |
attachments, close, free, getCondition, getLocalState, getRemoteCondition, getRemoteState, open, setCondition
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
free
close, free, getCondition, getLocalState, getRemoteCondition, getRemoteState, open, setCondition
attachments
public static final int MAX_CHANNELS
public ConnectionImpl()
Connection.Factory.create()
instead.public SessionImpl session()
Connection
session
in interface Connection
session
in interface ProtonJConnection
protected org.apache.qpid.proton.engine.impl.LinkNode<SessionImpl> addSessionEndpoint(SessionImpl endpoint)
protected org.apache.qpid.proton.engine.impl.LinkNode<LinkImpl> addLinkEndpoint(LinkImpl endpoint)
public Session sessionHead(java.util.EnumSet<EndpointState> local, java.util.EnumSet<EndpointState> remote)
Connection
sessionHead
in interface Connection
Session.next(EnumSet, EnumSet)
public Link linkHead(java.util.EnumSet<EndpointState> local, java.util.EnumSet<EndpointState> remote)
Connection
linkHead
in interface Connection
Link.next(EnumSet, EnumSet)
protected ConnectionImpl getConnectionImpl()
getConnectionImpl
in class EndpointImpl
public int getMaxChannels()
getMaxChannels
in interface ProtonJConnection
public java.lang.String getLocalContainerId()
public void setLocalContainerId(java.lang.String localContainerId)
setLocalContainerId
in interface ProtonJConnection
public DeliveryImpl getWorkHead()
Connection
getWorkHead
in interface Connection
Receiver.recv(byte[], int, int)
,
Delivery.settle()
,
Delivery.getWorkNext()
public void setContainer(java.lang.String container)
setContainer
in interface Connection
public java.lang.String getContainer()
getContainer
in interface Connection
public void setHostname(java.lang.String hostname)
Connection
setHostname
in interface Connection
hostname
- the RFC1035 compliant host name.public java.lang.String getRemoteContainer()
getRemoteContainer
in interface Connection
public java.lang.String getRemoteHostname()
getRemoteHostname
in interface Connection
public void setOfferedCapabilities(Symbol[] capabilities)
setOfferedCapabilities
in interface Connection
public void setDesiredCapabilities(Symbol[] capabilities)
setDesiredCapabilities
in interface Connection
public Symbol[] getRemoteOfferedCapabilities()
getRemoteOfferedCapabilities
in interface Connection
public Symbol[] getRemoteDesiredCapabilities()
getRemoteDesiredCapabilities
in interface Connection
public void setProperties(java.util.Map<Symbol,java.lang.Object> properties)
setProperties
in interface Connection
public java.util.Map<Symbol,java.lang.Object> getRemoteProperties()
getRemoteProperties
in interface Connection
public java.lang.String getHostname()
getHostname
in interface Connection
public java.util.Iterator<DeliveryImpl> getWorkSequence()
public TransportImpl getTransport()
getTransport
in interface Connection
public void removeTransportWork(DeliveryImpl delivery)
public java.lang.Object getContext()
getContext
in interface Connection
getContext
in interface Endpoint
getContext
in class EndpointImpl
Endpoint.setContext(Object)
public void setContext(java.lang.Object context)
Endpoint
setContext
in interface Connection
setContext
in interface Endpoint
setContext
in class EndpointImpl
public void collect(Collector collector)
collect
in interface Connection
public Reactor getReactor()
getReactor
in interface Connection
public void setReactor(Reactor reactor)