Copyright © 2009-2012 Marc Worrell
Behaviours: gen_server.
Authors: Marc Worrell (marc@worrell.nl).
abs_url/2 | Make the url an absolute url. |
code_change/3 | Convert process state when code is changed. |
dispatcher_args/0 | A list of dispatch rule arguments that shouldn't be considered with redirects. |
dispatchinfo/1 | Fetch the dispatchlist for the site. |
drop_port/1 | Drop the portnumber from the hostname. |
handle_call/3 | Create the url for the dispatch rule with name and arguments Args. |
handle_cast/2 | |
handle_info/2 | Handling all non call/cast messages. |
hostname/1 | Fetch the preferred hostname for this site. |
hostname_port/1 | Fetch the preferred hostname, including port, for this site. |
hostname_ssl_port/1 | Fetch the preferred hostname for SSL, including port, for this site. |
init/1 | Initiates the server, loads the dispatch list into the webmachine dispatcher. |
reload/1 | Reload all dispatch lists. |
reload/2 | |
start_link/1 | Starts the dispatch server. |
terminate/2 | This function is called by a gen_server when it is about to terminate. |
update/1 | Update the dispatch list but don't reload it yet. |
url_for/2 | Construct an uri from a named dispatch, assuming no parameters. |
url_for/3 | Construct an uri from a named dispatch and the parameters. |
url_for/4 | Construct an uri from a named dispatch and the parameters. |
abs_url(Url, Context) -> any()
Make the url an absolute url
code_change(OldVsn, State, Extra) -> {ok, NewState}
Convert process state when code is changed
dispatcher_args() -> any()
A list of dispatch rule arguments that shouldn't be considered with redirects. Used by controller_file_id and controller_redirect
dispatchinfo(Context::z:context() | pid() | atom()) -> {ok, {atom(), binary() | string(), binary() | string(), list(), boolean(), list()}} | {error, noproc}
Fetch the dispatchlist for the site.
drop_port(Hostname::undefined | none | string() | binary()) -> undefined | binary()
Drop the portnumber from the hostname
handle_call(X1::Request, From, State) -> {reply, Reply, State} | {reply, Reply, State, Timeout} | {noreply, State} | {noreply, State, Timeout} | {stop, Reason, Reply, State} | {stop, Reason, State}
Create the url for the dispatch rule with name and arguments Args.
handle_cast(Msg, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
handle_info(Info, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}
Handling all non call/cast messages
hostname(Context::z:context()) -> binary() | undefined
Fetch the preferred hostname for this site
hostname_port(Context::z:context()) -> binary() | undefined
Fetch the preferred hostname, including port, for this site
hostname_ssl_port(Context::z:context()) -> binary() | undefined
Fetch the preferred hostname for SSL, including port, for this site
init(SiteProps::Args) -> {ok, State} | {ok, State, Timeout} | ignore | {stop, Reason}
Initiates the server, loads the dispatch list into the webmachine dispatcher
reload(Context) -> any()
Reload all dispatch lists. Finds new dispatch lists and adds them to the dispatcher
reload(X1, Context) -> any()
start_link(SiteProps) -> {ok, Pid} | ignore | {error, Error}
Starts the dispatch server
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(Context) -> any()
Update the dispatch list but don't reload it yet. Used when flushing all sites, see z:flush/0
url_for(Name::atom(), Context) -> iolist()
Construct an uri from a named dispatch, assuming no parameters. Use html escape.
Construct an uri from a named dispatch and the parameters. Use html escape.
Construct an uri from a named dispatch and the parameters
Generated by EDoc