colossus.core

Delegator

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
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

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

    server

    reference to the server

    worker

    reference to the worker this delegator belongs to

Abstract Value Members

  1. abstract def acceptNewConnection: Option[ConnectionHandler]

    Function which determines whether or not to accept a connection.

    Function which determines whether or not to accept a connection.

    returns

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def createConnectionHandler: Option[ConnectionHandler]

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

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

    returns

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

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

    Definition Classes
    AnyRef → Any
  11. implicit val executor: ExecutionContextExecutor

  12. def finalize(): Unit

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

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

    This allows a Delegator to receive messages which are sent by way of ServerRef.

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

    returns

  15. def hashCode(): Int

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

    Definition Classes
    Any
  17. val log: LoggingAdapter

  18. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. def onShutdown(): Unit

    Shutdown hook.

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

  22. val server: ServerRef

    reference to the server

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

    Definition Classes
    AnyRef
  24. def toString(): String

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

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

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

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

    reference to the worker this delegator belongs to

Inherited from AnyRef

Inherited from Any

Ungrouped