Copyright © 2009 Marc Worrell
Behaviours: gen_server.
Authors: Marc Worrell (marc@worrell.nl).
add_script/1 | Send the scripts in the context to all pages of all sessions. |
add_script/2 | Send a script to all pages of all sessions. |
broadcast/2 | Broadcast a notification message to all open sessions. |
code_change/3 | |
continue_session/1 | Continue an existing session. |
count/1 | Return the number of open sessions. |
dump/1 | Dump all session to stdout. |
ensure_session/1 | Start a new session or continue an existing session. |
foreach/2 | Apply the given function to all sessions. |
handle_call/3 | |
handle_cast/2 | |
handle_info/2 | |
init/1 | Initialize the session server with an empty session table. |
rename_session/1 | Rename the session id, only call this after ensure_session. |
start_link/1 | Starts the session manager server. |
stop_session/1 | Explicitly stop an existing session. |
terminate/2 | |
tick/1 | Periodic tick used for cleaning up sessions. |
add_script(Context) -> none()
Send the scripts in the context to all pages of all sessions
add_script(Script::io_list(), Context) -> none()
Send a script to all pages of all sessions
broadcast(Broadcast::#broadcast{}, Context) -> ok
Broadcast a notification message to all open sessions.
code_change(OldVersion, State, Extra) -> any()
continue_session(Context) -> Context
Continue an existing session
count(Context) -> Int
Return the number of open sessions
dump(Context) -> void()
Dump all session to stdout
ensure_session(Context) -> Context
Start a new session or continue an existing session
foreach(Function::function(), Context::#context{}) -> void()
Apply the given function to all sessions
handle_call(Msg, From, State) -> any()
handle_cast(Msg, Session_srv) -> any()
handle_info(Msg, State) -> any()
init(SiteProps) -> {ok, State}
Initialize the session server with an empty session table. We make the session manager a system process so that crashes in sessions are isolated from each other.
rename_session(Context) -> Context
Rename the session id, only call this after ensure_session
start_link(SiteProps) -> {ok, Pid} | ignore | {error, Error}
Starts the session manager server
stop_session(Context) -> Context
Explicitly stop an existing session
terminate(Reason, State) -> any()
tick(SessionManager::pid()) -> void()
Periodic tick used for cleaning up sessions
Generated by EDoc, Feb 25 2011, 21:14:41.