cc.otavia.core.actor
Members list
Type members
Classlikes
Worker actor in the acceptor-worker pattern. Receives AcceptorActor.AcceptedChannel messages from an AcceptorActor and manages the lifecycle of accepted channels (mount, initialize, register).
Worker actor in the acceptor-worker pattern. Receives AcceptorActor.AcceptedChannel messages from an AcceptorActor and manages the lifecycle of accepted channels (mount, initialize, register).
Override afterAccepted to handle successfully registered channels, and resumeAsk to process AcceptorActor.AcceptedChannel alongside other message types.
Type parameters
- M
-
the type of messages this actor can handle alongside AcceptorActor.AcceptedChannel
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class HttpServerWorker
TCP server acceptor actor implementing the acceptor-worker pattern. Binds to a SocketAddress and accepts incoming TCP connections, then distributes them to a pool of AcceptedWorkerActor instances.
TCP server acceptor actor implementing the acceptor-worker pattern. Binds to a SocketAddress and accepts incoming TCP connections, then distributes them to a pool of AcceptedWorkerActor instances.
The acceptor creates a server socket channel via newChannel, binds it via the bind method, and handles accepted channels by forwarding them as AcceptedChannel messages to workers. Workers are created at mount time using the provided workerFactory.
Type parameters
- W
-
the worker actor type that handles accepted channels
Attributes
- Companion
- object
- Supertypes
- Known subtypes
-
class HttpServer
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
AcceptorActor.type
Base trait of the actor model. It has two concrete subclasses:
Base trait of the actor model. It has two concrete subclasses:
- cc.otavia.core.actor.StateActor: pure business logic actor
- cc.otavia.core.actor.ChannelsActor: IO-capable actor that manages Channel instances
Type parameters
- M
-
the type of messages this actor can handle
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait Appenderclass ConsoleAppender
Attributes
- Supertypes
-
trait Runnableclass Objecttrait Matchableclass Any
Runtime context injected into each Actor during mounting. Accessed via Actor.context.
Runtime context injected into each Actor during mounting. Accessed via Actor.context.
Provides access to system-level services and actor identity metadata.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait WorkerFactory[W]
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
AbstractActor[_]
IO-capable actor that manages Channel instances. Always fully drained during the event loop's IO phase (no time budget), ensuring IO responsiveness is never starved.
IO-capable actor that manages Channel instances. Always fully drained during the event loop's IO phase (no time budget), ensuring IO responsiveness is never starved.
In addition to the standard message handling via resumeAsk / resumeNotice, ChannelsActor provides resumeChannelStack for processing channel-level IO stacks, and lifecycle hooks like afterChannelClosed and afterChannelRegistered for channel events.
Type parameters
- M
-
the type of messages this actor can handle
Attributes
- Companion
- object
- Supertypes
- Known subtypes
-
class AcceptedWorkerActor[M]class HttpServerWorkerclass AcceptorActor[W]class HttpServerclass DatagramChannelsActor[M]class SocketChannelsActor[M]class HttpClientclass Clientclass ConnectionShow all
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ChannelsActor.type
UDP datagram channel actor. Creates and manages datagram (UDP) channels via the system's channel factory.
UDP datagram channel actor. Creates and manages datagram (UDP) channels via the system's channel factory.
Type parameters
- M
-
the type of messages this actor can handle
Attributes
- Supertypes
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Application entry point actor. Automatically sends command-line arguments as an Args notice to self on mount.
Application entry point actor. Automatically sends command-line arguments as an Args notice to self on mount.
Subclasses implement main0 to define the application logic. Note that afterMount is finalized to inject the args-sending behavior — override afterMount0 instead for custom mount-time initialization.
Value parameters
- args
-
command-line arguments passed to the application
Attributes
- Companion
- object
- Supertypes
TCP socket channel actor. Provides connect operations and manages TCP socket channels.
TCP socket channel actor. Provides connect operations and manages TCP socket channels.
Subclasses implement afterConnected to handle successful connections, and override Connect handling via resumeAsk. The connect method family supports both stack-based (suspend/resume) and direct (future-based) connection patterns.
Type parameters
- M
-
the type of messages this actor can handle
Attributes
- Companion
- object
- Supertypes
- Known subtypes
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
SocketChannelsActor.type
Pure business logic actor with no IO capabilities. Scheduled with a time budget alongside other StateActors, ensuring fair scheduling among many business actor.
Pure business logic actor with no IO capabilities. Scheduled with a time budget alongside other StateActors, ensuring fair scheduling among many business actor.
Override resumeAsk and/or resumeNotice to handle messages. Do NOT use this actor for direct network IO — use ChannelsActor or its subclasses instead.
Type parameters
- M
-
the type of messages this actor can handle
Attributes
- Supertypes
- Known subtypes