UserSessionProjectionHandler

io.github.positionpal.location.tracking.projections.UserSessionProjectionHandler
class UserSessionProjectionHandler[T](system: ActorSystem[_], val storage: UserSessionsWriter[IO, T]) extends Handler[EventEnvelope[Event]]

The handler that processes the events emitted by the RealTimeUserTracker actor updating the user's session state with the provided storage.

Attributes

Graph
Supertypes
trait Handler[EventEnvelope[Event]]
trait HandlerLifecycle
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def process(envelope: EventEnvelope[Event]): Future[Done]

The process method is invoked for each Envelope. One envelope is processed at a time. The returned Future is to be completed when the processing of the envelope has finished. It will not be invoked with the next envelope until after the returned Future has been completed.

The process method is invoked for each Envelope. One envelope is processed at a time. The returned Future is to be completed when the processing of the envelope has finished. It will not be invoked with the next envelope until after the returned Future has been completed.

Attributes

Definition Classes
Handler

Inherited methods

def start(): Future[Done]

Invoked when the projection is starting, before first envelope is processed. Can be overridden to implement initialization. It is also called when the Projection is restarted after a failure.

Invoked when the projection is starting, before first envelope is processed. Can be overridden to implement initialization. It is also called when the Projection is restarted after a failure.

Attributes

Inherited from:
HandlerLifecycle
def stop(): Future[Done]

Invoked when the projection has been stopped. Can be overridden to implement resource cleanup. It is also called when the Projection is restarted after a failure.

Invoked when the projection has been stopped. Can be overridden to implement resource cleanup. It is also called when the Projection is restarted after a failure.

Attributes

Inherited from:
HandlerLifecycle

Concrete fields