Copyright © 2009 Marc Worrell Date: 2009-12-15
Behaviours: gen_server.
Authors: Marc Worrell (marc@worrell.nl).
dispatch() = {no_dispatch_match, _UnmatchedHost, _UnmatchedPathTokens} | {Mod, ModOpts, HostTokens, Port, PathTokens, Bindings, AppRoot, StringPath} | handled
code_change/3 | Convert process state when code is changed. |
dispatch/3 | Match the host and path to a dispatch rule. |
get_fallback_site/0 | Retrieve the fallback site. |
handle_call/3 | Match a host/path to the dispatch rules. |
handle_cast/2 | Load a new set of dispatch rules. |
handle_info/2 | Handling all non call/cast messages. |
init/1 | Initiates the server. |
set_dispatch_rules/1 | Store a new set of dispatch rules, called when a site refreshes its modules or when a site is restarted. |
start_link/0 | Starts the server. |
start_link/1 | |
terminate/2 | This function is called by a gen_server when it is about to terminate. |
code_change(OldVsn, State, Extra) -> {ok, NewState}
Convert process state when code is changed
dispatch(Host::string(), Path::string(), ReqData::wm_reqdata) -> {dispatch(), NewReqData}
Match the host and path to a dispatch rule.
get_fallback_site() -> any()
Retrieve the fallback site.
handle_call(Message::Request, From, State) -> {reply, Reply, State} | {reply, Reply, State, Timeout} | {noreply, State} | {noreply, State, Timeout} | {stop, Reason, Reply, State} | {stop, Reason, State}
Match a host/path to the dispatch rules. Return a match result or a no_dispatch_match tuple.
handle_cast(Message::Msg, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
Load a new set of dispatch rules.
handle_info(Info, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
Handling all non call/cast messages
init(Args) -> {ok, State} | {ok, State, Timeout} | ignore | {stop, Reason}
Initiates the server.
set_dispatch_rules(DispatchRules) -> any()
Store a new set of dispatch rules, called when a site refreshes its modules or when a site is restarted.
start_link() -> {ok, Pid} | ignore | {error, Error}
Starts the server
start_link(Args) -> any()
terminate(Reason, State) -> void()
This function is called by a gen_server when it is about to terminate. It should be the opposite of Module:init/1 and do any necessary cleaning up. When it returns, the gen_server terminates with Reason. The return value is ignored.
Generated by EDoc, Feb 25 2011, 21:14:41.