Copyright © 2009-2011 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. |
| get_host_for_domain/1 | Fetch the host from the given domain name. |
| handle_call/3 | Match a host/path to the dispatch rules. |
| handle_cast/2 | Reloads the dispatch rules. |
| handle_info/2 | Handling all non call/cast messages. |
| init/1 | Initiates the server. |
| 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. |
| update_dispatchinfo/0 | Update the webmachine dispatch information. |
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.
get_host_for_domain(Domain) -> any()
Fetch the host from the given domain name
handle_call(Dispatch::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}
Reloads the dispatch rules.
handle_info(Info, State) -> any()
Handling all non call/cast messages
init(Args) -> {ok, State} | {ok, State, Timeout} | ignore | {stop, Reason}
Initiates the server.
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.
update_dispatchinfo() -> any()
Update the webmachine dispatch information. Collects dispatch information from all sites and sends it to webmachine for updating its dispatch lists and host information.
Generated by EDoc, Dec 10 2012, 20:44:34.