Package org.apache.qpid.proton.engine

# Interface Session

All Superinterfaces:
  `Endpoint`, `Extendable`

All Known Subinterfaces:
  `ProtonJSession`

All Known Implementing Classes:
  `SessionImpl`

public interface Session extends Endpoint
Session Note that session level flow control is handled internally by Proton.

## Method Summary

Modifier and Type
Method
Description
`Connection`
`getConnection()`
`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)`
`Receiver`
`receiver(String name)`
Returns a newly created receiver endpoint
`Sender`
`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 bytes)`
`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 outgoingWindowSize)`
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 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

Sender sender(String name)
Returns a newly created sender endpoint

### receiver

Receiver receiver(String name)
Returns a newly created receiver endpoint

### next

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

### getConnection

Connection getConnection()

### getIncomingCapacity

int getIncomingCapacity()

### setIncomingCapacity

void setIncomingCapacity(int bytes)

### getIncomingBytes

int getIncomingBytes()

### getOutgoingBytes

int getOutgoingBytes()

### getOutgoingWindow

long getOutgoingWindow()

### setOutgoingWindow

void setOutgoingWindow(long outgoingWindowSize)
Sets the outgoing window size.

Parameters:
  `outgoingWindowSize` - the outgoing window size

### setProperties

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. Must be called during session setup, i.e. before calling the `Endpoint.open()` method.

Parameters:
  `properties` - the properties map to send, or null for none.

### getProperties

Map<Symbol,Object> getProperties()
Gets the local session properties.

Returns:
  the properties map, or null if none was set.
See Also:
  - `setProperties(Map)`

### getRemoteProperties

Map<Symbol,Object> getRemoteProperties()
Gets the remote session properties, as conveyed from the peer via the Begin frame when opening the session.

Returns:
  the properties Map conveyed by the peer, or null if there was none.

### setOfferedCapabilities

void setOfferedCapabilities(Symbol[] offeredCapabilities)
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.

Parameters:
  `offeredCapabilities` - the offered capabilities array to send, or null for none.

### getOfferedCapabilities

Symbol[] getOfferedCapabilities()
Gets the local session offered capabilities.

Returns:
  the offered capabilities array, or null if none was set.
See Also:
  - `setOfferedCapabilities(Symbol[])`

### getRemoteOfferedCapabilities

Symbol[] getRemoteOfferedCapabilities()
Gets the remote session offered capabilities, as conveyed from the peer via the Begin frame when opening the session.

Returns:
  the offered capabilities array conveyed by the peer, or null if there was none.

### setDesiredCapabilities

void setDesiredCapabilities(Symbol[] desiredCapabilities)
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.

Parameters:
  `desiredCapabilities` - the desired capabilities array to send, or null for none.

### getDesiredCapabilities

Symbol[] getDesiredCapabilities()
Gets the local session desired capabilities.

Returns:
  the desired capabilities array, or null if none was set.
See Also:
  - `setDesiredCapabilities(Symbol[])`

### getRemoteDesiredCapabilities

Symbol[] getRemoteDesiredCapabilities()
Gets the remote session desired capabilities, as conveyed from the peer via the Begin frame when opening the session.

Returns:
  the desired capabilities array conveyed by the peer, or null if there was none.