Class SessionImpl
- java.lang.Object
-
- org.apache.qpid.proton.engine.impl.EndpointImpl
-
- org.apache.qpid.proton.engine.impl.SessionImpl
-
- All Implemented Interfaces:
Endpoint,Extendable,ProtonJEndpoint,ProtonJSession,Session
public class SessionImpl extends EndpointImpl implements ProtonJSession
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectionImplgetConnection()protected ConnectionImplgetConnectionImpl()Symbol[]getDesiredCapabilities()Gets the local session desired capabilities.intgetIncomingBytes()intgetIncomingCapacity()Symbol[]getOfferedCapabilities()Gets the local session offered capabilities.intgetOutgoingBytes()longgetOutgoingWindow()java.util.Map<Symbol,java.lang.Object>getProperties()Gets the local session properties.Symbol[]getRemoteDesiredCapabilities()Gets the remote session desired capabilities, as conveyed from the peer via the Begin frame when opening the session.Symbol[]getRemoteOfferedCapabilities()Gets the remote session offered capabilities, as conveyed from the peer via the Begin frame when opening the session.java.util.Map<Symbol,java.lang.Object>getRemoteProperties()Gets the remote session properties, as conveyed from the peer via the Begin frame when opening the session.Sessionnext(java.util.EnumSet<EndpointState> local, java.util.EnumSet<EndpointState> remote)ReceiverImplreceiver(java.lang.String name)Returns a newly created receiver endpointSenderImplsender(java.lang.String name)Returns a newly created sender endpointvoidsetDesiredCapabilities(Symbol[] desiredCapabilities)Sets the local session desired capabilities, to be conveyed to the peer via the Begin frame when opening the session.voidsetIncomingCapacity(int capacity)voidsetOfferedCapabilities(Symbol[] offeredCapabilities)Sets the local session offered capabilities, to be conveyed to the peer via the Begin frame when opening the session.voidsetOutgoingWindow(long outgoingWindow)Sets the outgoing window size.voidsetProperties(java.util.Map<Symbol,java.lang.Object> properties)Sets the local session properties, to be conveyed to the peer via the Begin frame when attaching the session to the session.-
Methods inherited from class org.apache.qpid.proton.engine.impl.EndpointImpl
attachments, close, free, getCondition, getContext, getLocalState, getRemoteCondition, getRemoteState, open, setCondition, setContext
-
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, getContext, getLocalState, getRemoteCondition, getRemoteState, open, setCondition, setContext
-
Methods inherited from interface org.apache.qpid.proton.engine.Extendable
attachments
-
-
-
-
Method Detail
-
sender
public SenderImpl sender(java.lang.String name)
Description copied from interface:SessionReturns a newly created sender endpoint- Specified by:
senderin interfaceProtonJSession- Specified by:
senderin interfaceSession
-
receiver
public ReceiverImpl receiver(java.lang.String name)
Description copied from interface:SessionReturns a newly created receiver endpoint
-
next
public Session next(java.util.EnumSet<EndpointState> local, java.util.EnumSet<EndpointState> remote)
-
getConnectionImpl
protected ConnectionImpl getConnectionImpl()
- Specified by:
getConnectionImplin classEndpointImpl
-
getConnection
public ConnectionImpl getConnection()
- Specified by:
getConnectionin interfaceSession
-
getIncomingCapacity
public int getIncomingCapacity()
- Specified by:
getIncomingCapacityin interfaceSession
-
setIncomingCapacity
public void setIncomingCapacity(int capacity)
- Specified by:
setIncomingCapacityin interfaceSession
-
getIncomingBytes
public int getIncomingBytes()
- Specified by:
getIncomingBytesin interfaceSession
-
getOutgoingBytes
public int getOutgoingBytes()
- Specified by:
getOutgoingBytesin interfaceSession
-
setOutgoingWindow
public void setOutgoingWindow(long outgoingWindow)
Description copied from interface:SessionSets the outgoing window size.- Specified by:
setOutgoingWindowin interfaceSession- Parameters:
outgoingWindow- the outgoing window size
-
getOutgoingWindow
public long getOutgoingWindow()
- Specified by:
getOutgoingWindowin interfaceSession
-
getProperties
public java.util.Map<Symbol,java.lang.Object> getProperties()
Description copied from interface:SessionGets the local session properties.- Specified by:
getPropertiesin interfaceSession- Returns:
- the properties map, or null if none was set.
- See Also:
Session.setProperties(Map)
-
setProperties
public void setProperties(java.util.Map<Symbol,java.lang.Object> properties)
Description copied from interface:SessionSets the local session properties, to be conveyed to the peer via the Begin frame when attaching the session to the session. Must be called during session setup, i.e. before calling theEndpoint.open()method.- Specified by:
setPropertiesin interfaceSession- Parameters:
properties- the properties map to send, or null for none.
-
getRemoteProperties
public java.util.Map<Symbol,java.lang.Object> getRemoteProperties()
Description copied from interface:SessionGets the remote session properties, as conveyed from the peer via the Begin frame when opening the session.- Specified by:
getRemotePropertiesin interfaceSession- Returns:
- the properties Map conveyed by the peer, or null if there was none.
-
getDesiredCapabilities
public Symbol[] getDesiredCapabilities()
Description copied from interface:SessionGets the local session desired capabilities.- Specified by:
getDesiredCapabilitiesin interfaceSession- Returns:
- the desired capabilities array, or null if none was set.
- See Also:
Session.setDesiredCapabilities(Symbol[])
-
setDesiredCapabilities
public void setDesiredCapabilities(Symbol[] desiredCapabilities)
Description copied from interface:SessionSets the local session desired capabilities, to be conveyed to the peer via the Begin frame when opening the session. Must be called during session setup, i.e. before calling theEndpoint.open()method.- Specified by:
setDesiredCapabilitiesin interfaceSession- Parameters:
desiredCapabilities- the desired capabilities array to send, or null for none.
-
getRemoteDesiredCapabilities
public Symbol[] getRemoteDesiredCapabilities()
Description copied from interface:SessionGets the remote session desired capabilities, as conveyed from the peer via the Begin frame when opening the session.- Specified by:
getRemoteDesiredCapabilitiesin interfaceSession- Returns:
- the desired capabilities array conveyed by the peer, or null if there was none.
-
getOfferedCapabilities
public Symbol[] getOfferedCapabilities()
Description copied from interface:SessionGets the local session offered capabilities.- Specified by:
getOfferedCapabilitiesin interfaceSession- Returns:
- the offered capabilities array, or null if none was set.
- See Also:
Session.setOfferedCapabilities(Symbol[])
-
setOfferedCapabilities
public void setOfferedCapabilities(Symbol[] offeredCapabilities)
Description copied from interface:SessionSets the local session offered capabilities, to be conveyed to the peer via the Begin frame when opening the session. Must be called during session setup, i.e. before calling theEndpoint.open()method.- Specified by:
setOfferedCapabilitiesin interfaceSession- Parameters:
offeredCapabilities- the offered capabilities array to send, or null for none.
-
getRemoteOfferedCapabilities
public Symbol[] getRemoteOfferedCapabilities()
Description copied from interface:SessionGets the remote session offered capabilities, as conveyed from the peer via the Begin frame when opening the session.- Specified by:
getRemoteOfferedCapabilitiesin interfaceSession- Returns:
- the offered capabilities array conveyed by the peer, or null if there was none.
-
-