A SessionLayer manages stateful communication. Every message is passed between a client and a server within a session context. Session identification is achieved by attaching a state property to a Message. The SessionLayer may deploy different state maintenance policies. For example, if it uses a connection-oriented transport (e.g. HTTPLayer), it may choose to associate a session with an established connection. Another possible policy would be to require the client to pass the state assigned to it by the service with any subsequent request. This policy would make session management resistent to connection failures.
The SessionLayer is responsible for:
To terminate a session a client or a service can make the Reply or Request additionally of type DiscardState. On receiving such request the SessionLayer will process the original message (e.g. deliver the Reply) and terminate the session after that.
Examples:
See also: Core Communication, HTTP, TCP/IP