abstract class PushSession[In, Out] extends Closable
Representation of a push-based protocol session.
The PushSession is intended to be used with the PushChannelHandle
abstraction to provide the interface for building a push-based protocol
implementation. In this pattern, events coming from the socket are
'pushed' into the session via the receive
method with well defined
thread behavior. Specifically, the receive
method will be called with
new events from the single-threaded Executor
available in the
associated PushChannelHandle. This provides two key benefits for push-based
protocol implementations:
- We remove the overhead of the Future
abstraction intrinsic to the
Transport
and Dispatcher
based model.
- The session itself provides a clear pattern for managing synchronization
that works well with the Promise
abstraction by avoiding explicit
synchronization. See the README.md
for more details.
- Alphabetic
- By Inheritance
- PushSession
- Closable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new PushSession(handle: PushChannelHandle[In, Out])
Abstract Value Members
- abstract def close(deadline: Time): Future[Unit]
- Definition Classes
- Closable
- abstract def receive(message: In): Unit
Receive a message, most commonly from the socket.
Receive a message, most commonly from the socket. Received messages are considered owned by the PushSession meaning the session is responsible for cleaning up any associated resources.
- abstract def status: Status
The current availability Status of this PushSession.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def close(after: Duration): Future[Unit]
- Definition Classes
- Closable
- final def close(): Future[Unit]
- Definition Classes
- Closable
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()