Skip to content

Latest commit

 

History

History
119 lines (46 loc) · 2.77 KB

ecron_event.md

File metadata and controls

119 lines (46 loc) · 2.77 KB

Module ecron_event

Module ecron_event

Event Handler.

Behaviours: gen_event.

Authors: Francesca Gangemi ([email protected]).

code_change/3Convert process state when code is changed.
handle_call/2Whenever an event manager receives a request sent using gen_event:call/3,4, this function is called for the specified event handler to handle the request.
handle_event/2
handle_info/2This function is called for each installed event handler when an event manager receives any other message than an event or a synchronous request (or a system message).
init/1
terminate/2Whenever an event handler is deleted from an event manager, this function is called.

code_change/3

code_change(OldVsn, State, Extra) -> {ok, NewState}



Convert process state when code is changed

handle_call/2

handle_call(Request, State) -> {ok, Reply, State} | {swap_handler, Reply, Args1, State1, Mod2, Args2} | {remove_handler, Reply}



Whenever an event manager receives a request sent using gen_event:call/3,4, this function is called for the specified event handler to handle the request.

handle_event/2

handle_event(Event, State) -> any()

handle_info/2

handle_info(Info, State) -> {ok, State} | {swap_handler, Args1, State1, Mod2, Args2} | remove_handler



This function is called for each installed event handler when an event manager receives any other message than an event or a synchronous request (or a system message).

init/1

init(Args) -> any()

terminate/2

terminate(Reason, State) -> void()



Whenever an event handler is deleted from an event manager, this function is called. It should be the opposite of Module:init/1 and do any necessary cleaning up.