Class/Object

colossus.core

Delegator

Related Docs: object Delegator | package core

Permalink

abstract class Delegator extends AnyRef

A Delegator is in charge of creating new ConnectionHandler’s for each new connection. Delegators live inside workers and run as part of the worker’s event loop

Delegators are the liaison between the outside world and your application's connection handling logic.

They can hold state, and pass that state to newly created ConnectionHandlers.

They can receive messages from the outside world, and thus be notified of changes in their environment by way of the handleMessage.

This is triggered by utilizing the ServerRef's delegatorBroadcast function.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Delegator
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Delegator(server: ServerRef, worker: WorkerRef)

    Permalink

    server

    reference to the server

    worker

    reference to the worker this delegator belongs to

Abstract Value Members

  1. abstract def acceptNewConnection: Option[ServerConnectionHandler]

    Permalink

    Function which determines whether or not to accept a connection.

    Function which determines whether or not to accept a connection.

    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def createConnectionHandler: Option[ServerConnectionHandler]

    Permalink

    This is the function called by the Workers to create an Option[ConnectionHandler]

  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. implicit val executor: ExecutionContextExecutor

    Permalink
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def handleMessage: PartialFunction[Any, Unit]

    Permalink

    This allows a Delegator to receive messages which are sent by way of ServerRef.delegatorBroadcast(msg : Any)

  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. val log: LoggingAdapter

    Permalink
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. def onShutdown(): Unit

    Permalink

    Shutdown hook.

    Shutdown hook. Called when a Worker stop or a server is unregistered.

  20. val server: ServerRef

    Permalink

    reference to the server

  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. val worker: WorkerRef

    Permalink

    reference to the worker this delegator belongs to

Inherited from AnyRef

Inherited from Any

Ungrouped