HttpServerWorker

cc.otavia.http.server.HttpServerWorker
See theHttpServerWorker companion object
class HttpServerWorker(routerMatcher: RouterMatcher, dates: ActorThreadLocal[Array[Byte]], serverName: String, sslCtx: Option[SslContext] = ...) extends AcceptedWorkerActor[Nothing]

Attributes

Companion
object
Graph
Supertypes
class AcceptedWorkerActor[Nothing]
class ChannelsActor[Nothing | AcceptedChannel]
trait Actor[Nothing | AcceptedChannel]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def resumeAsk(stack: AskStack[AcceptedChannel]): StackYield

Handle an Ask message. Called on initial receipt and on each resume after an awaited reply completes.

Handle an Ask message. Called on initial receipt and on each resume after an awaited reply completes.

Match on stack.state to distinguish initial entry from resumed execution:

override protected def resumeAsk(stack: AskStack[MyAsk]): StackYield =
  stack.state match
    case _: StartState =>
      val state = FutureState[MyReply]()
      address.ask(MyRequest(), state.future)
      stack.suspend(state)
    case state: FutureState[MyReply] =>
      stack.return(state.future.getNow)

Attributes

Definition Classes
AbstractActor

Inherited methods

final def actorId: Long

The unique id of this actor distributed by ActorSystem, when a actor instance is mounted to a ActorSystem, the actor system will distribute a unique id to the instance.

The unique id of this actor distributed by ActorSystem, when a actor instance is mounted to a ActorSystem, the actor system will distribute a unique id to the instance.

Attributes

Returns

id number

Inherited from:
Actor

Alias for self — the typed address of this IO-capable actor.

Alias for self — the typed address of this IO-capable actor.

Attributes

Inherited from:
ChannelsActor
final def autowire[A <: Actor[_] : ClassTag](qualifier: String): Address[MessageOf[A]]

Attributes

Inherited from:
Actor
final def autowire[A <: Actor[_] : ClassTag](qualifier: Option[String] = ..., remote: Option[String] = ...): Address[MessageOf[A]]

Attributes

Inherited from:
Actor
def batchable: Boolean

Whether this actor supports batch message processing. When true, the ActorSystem dispatches multiple messages in bulk rather than individually.

Whether this actor supports batch message processing. When true, the ActorSystem dispatches multiple messages in bulk rather than individually.

Attributes

Inherited from:
Actor
final override def context: ActorContext

Context of this actor. This method can only used after actor instance mount to actor system

Context of this actor. This method can only used after actor instance mount to actor system

Attributes

Definition Classes
AbstractActor -> Actor
Inherited from:
AbstractActor (hidden)
final protected def handleAccepted(stack: AskStack[AcceptedChannel]): StackYield

handle AcceptedChannel message, this method will called by resumeAsk

handle AcceptedChannel message, this method will called by resumeAsk

Attributes

Inherited from:
AcceptedWorkerActor
def handler: Option[ChannelInitializer[_ <: Channel]]

Optional ChannelInitializer for pipeline setup. Override to provide a default handler.

Optional ChannelInitializer for pipeline setup. Override to provide a default handler.

Attributes

Inherited from:
ChannelsActor
def maxBatchSize: Int

Maximum number of messages per batch. Used by the scheduling system.

Maximum number of messages per batch. Used by the scheduling system.

Attributes

Inherited from:
Actor

Attributes

Inherited from:
Actor
override protected def newChannel(): Channel

Factory method to create a new Channel instance. Override to specify the channel type.

Factory method to create a new Channel instance. Override to specify the channel type.

Attributes

Definition Classes
Inherited from:
AcceptedWorkerActor
def nice: Int

Attributes

Inherited from:
Actor
final protected def noticeSelfHead(call: Notice & (Nothing | AcceptedChannel)): Unit

Send a Notice to self, inserted at the head of the notice mailbox before all other pending notices.

Send a Notice to self, inserted at the head of the notice mailbox before all other pending notices.

Attributes

Inherited from:
AbstractActor (hidden)
final def reactor: Reactor

Attributes

Inherited from:
ChannelsActor
protected def resumeBatchAsk(stack: BatchAskStack[(Nothing | AcceptedChannel) & Ask[_ <: Reply]]): StackYield

Handle a batch of Ask messages in a single stack.

Handle a batch of Ask messages in a single stack.

Attributes

Inherited from:
AbstractActor (hidden)
protected def resumeBatchNotice(stack: BatchNoticeStack[(Nothing | AcceptedChannel) & Notice]): StackYield

Handle a batch of Notice messages in a single stack.

Handle a batch of Notice messages in a single stack.

Attributes

Inherited from:
AbstractActor (hidden)
protected def resumeNotice(stack: NoticeStack[(Nothing | AcceptedChannel) & Notice]): StackYield

Handle a Notice message. Called on initial receipt and on each resume.

Handle a Notice message. Called on initial receipt and on each resume.

Attributes

Inherited from:
AbstractActor (hidden)
override def self: ActorAddress[Nothing | AcceptedChannel]

Typed self-address. Separated from Actor by the +M/Address[-M] variance conflict.

Typed self-address. Separated from Actor by the +M/Address[-M] variance conflict.

Attributes

Definition Classes
ChannelsActor -> AbstractActor
Inherited from:
ChannelsActor
final def system: ActorSystem

The ActorSystem of this actor instance is running

The ActorSystem of this actor instance is running

Attributes

Returns

ActorSystem

Inherited from:
Actor
final def timer: Timer

Attributes

Inherited from:
Actor

Inherited fields

val batchAskFilter: (Ask[_]) => Boolean

Filter function for batching Ask messages. Return true to include in batch.

Filter function for batching Ask messages. Return true to include in batch.

Attributes

Inherited from:
Actor
val batchNoticeFilter: Notice => Boolean

Filter function for batching Notice messages. Return true to include in batch.

Filter function for batching Notice messages. Return true to include in batch.

Attributes

Inherited from:
Actor
protected var logger: Logger

Attributes

Inherited from:
AbstractActor (hidden)