public class ConnectionImpl extends EndpointImpl implements ProtonJConnection
| Modifier and Type | Class and Description |
|---|---|
private class |
ConnectionImpl.WorkSequence |
Connection.Factoryfreed| Constructor and Description |
|---|
ConnectionImpl()
Deprecated.
This constructor's visibility will be reduced to the default scope in a future release.
Client code outside this module should use
Connection.Factory.create() instead. |
| Modifier and Type | Method and Description |
|---|---|
protected LinkNode<LinkImpl> |
addLinkEndpoint(LinkImpl endpoint) |
(package private) void |
addModified(EndpointImpl endpoint) |
protected LinkNode<SessionImpl> |
addSessionEndpoint(SessionImpl endpoint) |
(package private) void |
addTransportWork(DeliveryImpl delivery) |
(package private) void |
addWork(DeliveryImpl delivery) |
void |
collect(Collector collector) |
(package private) void |
doFree() |
(package private) void |
freeSession(SessionImpl session) |
protected ConnectionImpl |
getConnectionImpl() |
java.lang.String |
getContainer() |
java.lang.Object |
getContext() |
(package private) Symbol[] |
getDesiredCapabilities() |
java.lang.String |
getHostname() |
java.lang.String |
getLocalContainerId() |
int |
getMaxChannels() |
(package private) Symbol[] |
getOfferedCapabilities() |
(package private) java.util.Map<Symbol,java.lang.Object> |
getProperties() |
Reactor |
getReactor() |
java.lang.String |
getRemoteContainer() |
Symbol[] |
getRemoteDesiredCapabilities() |
java.lang.String |
getRemoteHostname() |
Symbol[] |
getRemoteOfferedCapabilities() |
java.util.Map<Symbol,java.lang.Object> |
getRemoteProperties() |
TransportImpl |
getTransport() |
(package private) EndpointImpl |
getTransportHead() |
(package private) EndpointImpl |
getTransportTail() |
(package private) DeliveryImpl |
getTransportWorkHead() |
(package private) int |
getTransportWorkSize() |
DeliveryImpl |
getWorkHead()
Returns the head of the delivery work list.
|
java.util.Iterator<DeliveryImpl> |
getWorkSequence() |
(package private) DeliveryImpl |
getWorkTail() |
(package private) void |
handleOpen(Open open) |
Link |
linkHead(java.util.EnumSet<EndpointState> local,
java.util.EnumSet<EndpointState> remote)
Returns the head of the list of links in the specified states.
|
(package private) void |
localClose() |
(package private) void |
localOpen() |
(package private) void |
modifyEndpoints() |
(package private) void |
postFinal() |
(package private) EventImpl |
put(Event.Type type,
java.lang.Object context) |
(package private) void |
removeLinkEndpoint(LinkNode<LinkImpl> node) |
(package private) void |
removeModified(EndpointImpl endpoint) |
(package private) void |
removeSessionEndpoint(LinkNode<SessionImpl> node) |
void |
removeTransportWork(DeliveryImpl delivery) |
(package private) void |
removeWork(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) |
void |
setLocalContainerId(java.lang.String localContainerId) |
void |
setOfferedCapabilities(Symbol[] capabilities) |
void |
setProperties(java.util.Map<Symbol,java.lang.Object> properties) |
void |
setReactor(Reactor reactor) |
(package private) void |
setRemoteContainer(java.lang.String remoteContainerId) |
(package private) void |
setRemoteDesiredCapabilities(Symbol[] remoteDesiredCapabilities) |
(package private) void |
setRemoteHostname(java.lang.String remoteHostname) |
(package private) void |
setRemoteOfferedCapabilities(Symbol[] remoteOfferedCapabilities) |
(package private) void |
setRemoteProperties(java.util.Map<Symbol,java.lang.Object> remoteProperties) |
(package private) void |
setTransport(TransportImpl transport) |
(package private) void |
workUpdate(DeliveryImpl delivery) |
attachments, clearModified, close, decref, free, getCondition, getLocalState, getRemoteCondition, getRemoteState, incref, isModified, modified, modified, open, setCondition, setLocalState, setRemoteState, setTransportNext, setTransportPrev, transportNext, transportPrevclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfreeclose, free, getCondition, getLocalState, getRemoteCondition, getRemoteState, open, setConditionattachmentspublic static final int MAX_CHANNELS
private java.util.List<SessionImpl> _sessions
private EndpointImpl _transportTail
private EndpointImpl _transportHead
private int _maxChannels
private LinkNode<SessionImpl> _sessionHead
private LinkNode<SessionImpl> _sessionTail
private DeliveryImpl _workHead
private DeliveryImpl _workTail
private TransportImpl _transport
private DeliveryImpl _transportWorkHead
private DeliveryImpl _transportWorkTail
private int _transportWorkSize
private java.lang.String _localContainerId
private java.lang.String _localHostname
private java.lang.String _remoteContainer
private java.lang.String _remoteHostname
private Symbol[] _offeredCapabilities
private Symbol[] _desiredCapabilities
private Symbol[] _remoteOfferedCapabilities
private Symbol[] _remoteDesiredCapabilities
private java.util.Map<Symbol,java.lang.Object> _properties
private java.util.Map<Symbol,java.lang.Object> _remoteProperties
private java.lang.Object _context
private CollectorImpl _collector
private Reactor _reactor
private static final Symbol[] EMPTY_SYMBOL_ARRAY
@Deprecated public ConnectionImpl()
Connection.Factory.create() instead.public SessionImpl session()
Connectionsession in interface Connectionsession in interface ProtonJConnectionvoid freeSession(SessionImpl session)
protected LinkNode<SessionImpl> addSessionEndpoint(SessionImpl endpoint)
void removeSessionEndpoint(LinkNode<SessionImpl> node)
public Session sessionHead(java.util.EnumSet<EndpointState> local, java.util.EnumSet<EndpointState> remote)
ConnectionsessionHead in interface ConnectionSession.next(EnumSet, EnumSet)public Link linkHead(java.util.EnumSet<EndpointState> local, java.util.EnumSet<EndpointState> remote)
ConnectionlinkHead in interface ConnectionLink.next(EnumSet, EnumSet)protected ConnectionImpl getConnectionImpl()
getConnectionImpl in class EndpointImplvoid postFinal()
postFinal in class EndpointImplvoid doFree()
doFree in class EndpointImplvoid modifyEndpoints()
void handleOpen(Open open)
EndpointImpl getTransportHead()
EndpointImpl getTransportTail()
void addModified(EndpointImpl endpoint)
void removeModified(EndpointImpl endpoint)
public int getMaxChannels()
getMaxChannels in interface ProtonJConnectionpublic java.lang.String getLocalContainerId()
public void setLocalContainerId(java.lang.String localContainerId)
setLocalContainerId in interface ProtonJConnectionpublic DeliveryImpl getWorkHead()
ConnectiongetWorkHead in interface ConnectionReceiver.recv(byte[], int, int),
Delivery.settle(),
Delivery.getWorkNext()public void setContainer(java.lang.String container)
setContainer in interface Connectionpublic java.lang.String getContainer()
getContainer in interface Connectionpublic void setHostname(java.lang.String hostname)
setHostname in interface Connectionpublic java.lang.String getRemoteContainer()
getRemoteContainer in interface Connectionpublic java.lang.String getRemoteHostname()
getRemoteHostname in interface Connectionpublic void setOfferedCapabilities(Symbol[] capabilities)
setOfferedCapabilities in interface Connectionpublic void setDesiredCapabilities(Symbol[] capabilities)
setDesiredCapabilities in interface Connectionpublic Symbol[] getRemoteOfferedCapabilities()
getRemoteOfferedCapabilities in interface Connectionpublic Symbol[] getRemoteDesiredCapabilities()
getRemoteDesiredCapabilities in interface ConnectionSymbol[] getOfferedCapabilities()
Symbol[] getDesiredCapabilities()
void setRemoteOfferedCapabilities(Symbol[] remoteOfferedCapabilities)
void setRemoteDesiredCapabilities(Symbol[] remoteDesiredCapabilities)
java.util.Map<Symbol,java.lang.Object> getProperties()
public void setProperties(java.util.Map<Symbol,java.lang.Object> properties)
setProperties in interface Connectionpublic java.util.Map<Symbol,java.lang.Object> getRemoteProperties()
getRemoteProperties in interface Connectionvoid setRemoteProperties(java.util.Map<Symbol,java.lang.Object> remoteProperties)
public java.lang.String getHostname()
getHostname in interface Connectionvoid setRemoteContainer(java.lang.String remoteContainerId)
void setRemoteHostname(java.lang.String remoteHostname)
DeliveryImpl getWorkTail()
void removeWork(DeliveryImpl delivery)
void addWork(DeliveryImpl delivery)
public java.util.Iterator<DeliveryImpl> getWorkSequence()
void setTransport(TransportImpl transport)
public TransportImpl getTransport()
getTransport in interface ConnectionDeliveryImpl getTransportWorkHead()
int getTransportWorkSize()
public void removeTransportWork(DeliveryImpl delivery)
void addTransportWork(DeliveryImpl delivery)
void workUpdate(DeliveryImpl delivery)
public java.lang.Object getContext()
getContext in interface ConnectiongetContext in interface EndpointgetContext in class EndpointImplEndpoint.setContext(Object)public void setContext(java.lang.Object context)
EndpointsetContext in interface ConnectionsetContext in interface EndpointsetContext in class EndpointImplpublic void collect(Collector collector)
collect in interface ConnectionEventImpl put(Event.Type type, java.lang.Object context)
void localOpen()
localOpen in class EndpointImplvoid localClose()
localClose in class EndpointImplpublic Reactor getReactor()
getReactor in interface Connectionpublic void setReactor(Reactor reactor)