Package org.apache.qpid.proton.engine.impl

# 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

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()`
`Map<Symbol,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.
`Map<Symbol,Object>`
`getRemoteProperties()`
Gets the remote session properties, as conveyed from the peer via the Begin frame when opening the session.
`Session`
`next(EnumSet<EndpointState> local, EnumSet<EndpointState> remote)`
`ReceiverImpl`
`receiver(String name)`
Returns a newly created receiver endpoint
`SenderImpl`
`sender(String name)`
Returns a newly created sender endpoint
`void`
`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(Map<Symbol,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 Details

### sender

public SenderImpl sender(String name)
Description copied from interface: `Session`
Returns a newly created sender endpoint

Specified by:
  `sender` in interface `ProtonJSession`
Specified by:
  `sender` in interface `Session`

### receiver

public ReceiverImpl receiver(String name)
Description copied from interface: `Session`
Returns a newly created receiver endpoint

Specified by:
  `receiver` in interface `Session`

### next

public Session next(EnumSet<EndpointState> local, EnumSet<EndpointState> remote)

Specified by:
  `next` in interface `Session`

### getConnectionImpl

protected ConnectionImpl getConnectionImpl()

Specified by:
  `getConnectionImpl` in class `EndpointImpl`

### getConnection

public ConnectionImpl getConnection()

Specified by:
  `getConnection` in interface `Session`

### getIncomingCapacity

public int getIncomingCapacity()

Specified by:
  `getIncomingCapacity` in interface `Session`

### setIncomingCapacity

public void setIncomingCapacity(int capacity)

Specified by:
  `setIncomingCapacity` in interface `Session`

### getIncomingBytes

public int getIncomingBytes()

Specified by:
  `getIncomingBytes` in interface `Session`

### getOutgoingBytes

public int getOutgoingBytes()

Specified by:
  `getOutgoingBytes` in interface `Session`

### setOutgoingWindow

public void setOutgoingWindow(long outgoingWindow)
Description copied from interface: `Session`
Sets the outgoing window size.

Specified by:
  `setOutgoingWindow` in interface `Session`
Parameters:
  `outgoingWindow` - the outgoing window size

### getOutgoingWindow

public long getOutgoingWindow()

Specified by:
  `getOutgoingWindow` in interface `Session`

### getProperties

public Map<Symbol,Object> getProperties()
Description copied from interface: `Session`
Gets the local session properties.

Specified by:
  `getProperties` in interface `Session`
Returns:
  the properties map, or null if none was set.
See Also:
  - `Session.setProperties(Map)`

### setProperties

public void setProperties(Map<Symbol,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 the `Endpoint.open()` method.

Specified by:
  `setProperties` in interface `Session`
Parameters:
  `properties` - the properties map to send, or null for none.

### getRemoteProperties

public Map<Symbol,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 interface `Session`
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 interface `Session`
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 the `Endpoint.open()` method.

Specified by:
  `setDesiredCapabilities` in interface `Session`
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 interface `Session`
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 interface `Session`
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 the `Endpoint.open()` method.

Specified by:
  `setOfferedCapabilities` in interface `Session`
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 interface `Session`
Returns:
  the offered capabilities array conveyed by the peer, or null if there was none.