W3WS.Handler.GenServerHandler behaviour (w3ws v0.3.0)
A GenServer implementation of W3WS.Handler
. Useful for building out a
handler with a GenServer.
See W3WS.Handler.TimedRemovalHandler
and W3WS.Handler.BlockRemovalHandler
for examples.
This handler monitors the W3WS.Rpc
passed to initialize/1
. If the
rpc goes down, this handler will terminate.
The handler will be linked to the process which calls initialize/1
.
Typically this will be a W3WS.Listener
or a W3WS.Replayer
. If the
handler crashes the caller will go down as well due to the link.
Summary
Callbacks
Handle an event cast to the GenServer
Determine if the handler is settled based on the GenServer state
Callbacks
Link to this callback
handle_cast_event(env, state)
Handle an event cast to the GenServer
Link to this callback
is_settled?(state)
Determine if the handler is settled based on the GenServer state