colossus.service

ServiceServer

class ServiceServer[P <: Protocol] extends ControllerDownstream[Server[P]] with ServiceUpstream[P] with UpstreamEventHandler[ControllerUpstream[Server[P]]] with DownstreamEventHandler[GenRequestHandler[P]]

The ServiceServer provides an interface and basic functionality to create a server that processes requests and returns responses over a codec.

A Codec is simply the format in which the data is represented. Http, Redis protocol, Memcached protocl are all examples(and natively supported). It is entirely possible to use an additional Codec by creating a Codec to parse the desired protocol.

Requests can be processed synchronously or asynchronously. The server will ensure that all responses are written back in the order that they are received.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ServiceServer
  2. DownstreamEventHandler
  3. HasDownstream
  4. UpstreamEventHandler
  5. ServiceUpstream
  6. UpstreamEvents
  7. ControllerDownstream
  8. DownstreamEvents
  9. WorkerItemEvents
  10. HasUpstream
  11. AnyRef
  12. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ServiceServer(requestHandler: GenRequestHandler[P])

Type Members

  1. type Request = P.Request

  2. type Response = P.Response

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 bind(): Unit

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def config: ServiceConfig

  10. def connected(): Unit

  11. def connectionTerminated(reason: DisconnectCause): Unit

  12. def context: Context

  13. val controllerConfig: ControllerConfig

    Definition Classes
    ServiceServerControllerDownstream
  14. def currentRequestBufferSize: Int

  15. def downstream: GenRequestHandler[P]

    Definition Classes
    ServiceServerHasDownstream
  16. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  21. def idleCheck(period: FiniteDuration): Unit

  22. val incoming: BufferedPipe[Request]

    Definition Classes
    ServiceServerControllerDownstream
  23. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  24. val log: LoggingAdapter

  25. def name: MetricAddress

  26. implicit val namespace: MetricNamespace

    Definition Classes
    ServiceServerControllerDownstream
  27. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  30. def onBind(): Unit

    Called when the item is bound to a worker.

    Called when the item is bound to a worker.

    Definition Classes
    ServiceServerWorkerItemEvents
  31. def onConnected(): Unit

    Definition Classes
    ServiceServerDownstreamEvents
  32. def onConnectionTerminated(cause: DisconnectCause): Unit

    Definition Classes
    ServiceServerDownstreamEvents
  33. def onFatalError(reason: Throwable): Some[Response]

    This method can be overriden to send a message in the event of a fatal error before the connection is closed.

    This method can be overriden to send a message in the event of a fatal error before the connection is closed. There is no guarantee though that the message is actually sent since the connection may have already closed.

    Definition Classes
    ServiceServerControllerDownstream
  34. def onIdleCheck(period: FiniteDuration): Unit

    Definition Classes
    ServiceServerDownstreamEvents
  35. def onReceivedMessage(sender: ActorRef, message: Any): Unit

    Attributes
    protected
    Definition Classes
    DownstreamEvents
  36. def onShutdown(): Unit

    Attributes
    protected
    Definition Classes
    UpstreamEvents
  37. def onUnbind(): Unit

    Called when the item has been unbound from a worker

    Called when the item has been unbound from a worker

    Attributes
    protected
    Definition Classes
    WorkerItemEvents
  38. def processBadRequest(reason: Throwable): Some[Response]

  39. def processMessages(): Unit

  40. def receivedMessage(message: Any, sender: ActorRef): Unit

    Provides a way to send this WorkerItem a message from an Actor by way of WorkerCommand.

    Provides a way to send this WorkerItem a message from an Actor by way of WorkerCommand.Message.

    message

    The message that was sent

    sender

    The sender who sent the message

    Definition Classes
    DownstreamEventHandlerDownstreamEventsWorkerItemEvents
  41. val requestHandler: GenRequestHandler[P]

  42. def setUpstream(up: ControllerUpstream[Server[P]]): Unit

    Definition Classes
    HasUpstream
  43. def shutdown(): Unit

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

    Definition Classes
    AnyRef
  45. def toString(): String

    Definition Classes
    AnyRef → Any
  46. def unbind(): Unit

  47. lazy val upstream: ControllerUpstream[Server[P]]

    Definition Classes
    HasUpstream
  48. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from HasDownstream[GenRequestHandler[P]]

Inherited from ServiceUpstream[P]

Inherited from UpstreamEvents

Inherited from ControllerDownstream[Server[P]]

Inherited from DownstreamEvents

Inherited from WorkerItemEvents

Inherited from HasUpstream[ControllerUpstream[Server[P]]]

Inherited from AnyRef

Inherited from Any

Ungrouped