Module ocs_event_log

This gen_event behaviour callback module implements an event handler of the ocs application.

Copyright © 2022 - 2026 SigScale Global Inc.

Behaviours: gen_event.

Description

This gen_event behaviour callback module implements an event handler of the ocs application.

Data Types

state()

state() = #state{profile = atom(), callback = string(), fsm = pid(), type = atom(), established = boolean(), pending = boolean(), options = [{atom(), term()}]}

Function Index

notify/2Send a notification event.
init/1Initialize the ocs_event_log server.
handle_event/2Handle a request sent using gen_event:notify/2, gen_event:sync_notify/2.
handle_call/2Handle a request sent using gen_event:call/3,4.
handle_info/2Handle a received message.
terminate/2Cleanup and exit.
code_change/3Update internal state data during a release upgrade/downgrade.
pending_result/3Handle async result of httpc:request/5 while session pending.
established_result/1Handle async result of httpc:request/5 while session established.

Function Details

notify/2

notify(EventType, EventPayLoad) -> ok

Send a notification event.

The EventPayload should contain the entire new resource (create), the updated attributes only (attributeValueChange) or only id and href (remove).

init/1

init(Args) -> Result

Initialize the ocs_event_log server.

See also: //stdlib/gen_event:init/1.

handle_event/2

handle_event(Event, State) -> Result

Handle a request sent using gen_event:notify/2, gen_event:sync_notify/2.

handle_call/2

handle_call(Request, State) -> Result

Handle a request sent using gen_event:call/3,4.

See also: //stdlib/gen_event:handle_call/3.

handle_info/2

handle_info(Info, Fsm) -> Result

Handle a received message.

See also: //stdlib/gen_event:handle_info/2.

terminate/2

terminate(Arg, State) -> term()

Cleanup and exit.

See also: //stdlib/gen_event:terminate/2.

code_change/3

code_change(OldVsn, State, Extra) -> Result

Update internal state data during a release upgrade/downgrade.

See also: //stdlib/gen_event:code_change/3.

pending_result/3

pending_result(ReplyInfo, EventManager, Handler) -> ok

Handle async result of httpc:request/5 while session pending.

established_result/1

established_result(ReplyInfo) -> ok

Handle async result of httpc:request/5 while session established.


Generated by EDoc