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 ConnectionImpl
getConnection()
protected ConnectionImpl
getConnectionImpl()
Symbol[]
getDesiredCapabilities()
Gets the local session desired capabilities.int
getIncomingBytes()
int
getIncomingCapacity()
Symbol[]
getOfferedCapabilities()
Gets the local session offered capabilities.int
getOutgoingBytes()
long
getOutgoingWindow()
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.Session
next(java.util.EnumSet<EndpointState> local, java.util.EnumSet<EndpointState> remote)
ReceiverImpl
receiver(java.lang.String name)
Returns a newly created receiver endpointSenderImpl
sender(java.lang.String name)
Returns a newly created sender endpointvoid
setDesiredCapabilities(Symbol[] desiredCapabilities)
Sets the local session desired capabilities, to be conveyed to the peer via the Begin frame when opening the session.void
setIncomingCapacity(int capacity)
void
setOfferedCapabilities(Symbol[] offeredCapabilities)
Sets the local session offered capabilities, to be conveyed to the peer via the Begin frame when opening the session.void
setOutgoingWindow(long outgoingWindow)
Sets the outgoing window size.void
setProperties(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:Session
Returns a newly created sender endpoint- Specified by:
sender
in interfaceProtonJSession
- Specified by:
sender
in interfaceSession
-
receiver
public ReceiverImpl receiver(java.lang.String name)
Description copied from interface:Session
Returns 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:
getConnectionImpl
in classEndpointImpl
-
getConnection
public ConnectionImpl getConnection()
- Specified by:
getConnection
in interfaceSession
-
getIncomingCapacity
public int getIncomingCapacity()
- Specified by:
getIncomingCapacity
in interfaceSession
-
setIncomingCapacity
public void setIncomingCapacity(int capacity)
- Specified by:
setIncomingCapacity
in interfaceSession
-
getIncomingBytes
public int getIncomingBytes()
- Specified by:
getIncomingBytes
in interfaceSession
-
getOutgoingBytes
public int getOutgoingBytes()
- Specified by:
getOutgoingBytes
in interfaceSession
-
setOutgoingWindow
public void setOutgoingWindow(long outgoingWindow)
Description copied from interface:Session
Sets the outgoing window size.- Specified by:
setOutgoingWindow
in interfaceSession
- Parameters:
outgoingWindow
- the outgoing window size
-
getOutgoingWindow
public long getOutgoingWindow()
- Specified by:
getOutgoingWindow
in interfaceSession
-
getProperties
public java.util.Map<Symbol,java.lang.Object> getProperties()
Description copied from interface:Session
Gets the local session properties.- Specified by:
getProperties
in 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:Session
Sets 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:
setProperties
in 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:Session
Gets the remote session properties, as conveyed from the peer via the Begin frame when opening the session.- Specified by:
getRemoteProperties
in interfaceSession
- Returns:
- the properties Map conveyed by the peer, or null if there was none.
-
getDesiredCapabilities
public Symbol[] getDesiredCapabilities()
Description copied from interface:Session
Gets the local session desired capabilities.- Specified by:
getDesiredCapabilities
in 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:Session
Sets 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:
setDesiredCapabilities
in interfaceSession
- Parameters:
desiredCapabilities
- the desired capabilities array to send, or null for none.
-
getRemoteDesiredCapabilities
public Symbol[] getRemoteDesiredCapabilities()
Description copied from interface:Session
Gets the remote session desired capabilities, as conveyed from the peer via the Begin frame when opening the session.- Specified by:
getRemoteDesiredCapabilities
in interfaceSession
- Returns:
- the desired capabilities array conveyed by the peer, or null if there was none.
-
getOfferedCapabilities
public Symbol[] getOfferedCapabilities()
Description copied from interface:Session
Gets the local session offered capabilities.- Specified by:
getOfferedCapabilities
in 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:Session
Sets 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:
setOfferedCapabilities
in interfaceSession
- Parameters:
offeredCapabilities
- the offered capabilities array to send, or null for none.
-
getRemoteOfferedCapabilities
public Symbol[] getRemoteOfferedCapabilities()
Description copied from interface:Session
Gets the remote session offered capabilities, as conveyed from the peer via the Begin frame when opening the session.- Specified by:
getRemoteOfferedCapabilities
in interfaceSession
- Returns:
- the offered capabilities array conveyed by the peer, or null if there was none.
-
-