observables v0.1.2 Observables.GenObservable behaviour View Source

Link to this section Summary

Functions

Throttles the GenObservable. It will lock it up for given timeperiod such that it can not send/receive events

This function is called by the GenServer process. Here we call the init function f the module provided by the programmer

Sends a new_value message to this GenObservable, such that it procudes a new value for its dependees

Sends a message to observee_pid that observer_pid needs to be notified of new events

This function is called when a programmer starts his module: Observable.start_link(MyObservable, initial_state)

Sends a message to observee_pid that observer_pid no longer wants to be notified of events

Link to this section Functions

Throttles the GenObservable. It will lock it up for given timeperiod such that it can not send/receive events.

This function is called by the GenServer process. Here we call the init function f the module provided by the programmer.

Link to this function send_event(consumer, value) View Source

Sends a new_value message to this GenObservable, such that it procudes a new value for its dependees.

Link to this function send_to(producer, consumer) View Source

Sends a message to observee_pid that observer_pid needs to be notified of new events.

Link to this function spawn_supervised(module, args) View Source
Link to this function start(module, args, options \\ []) View Source
Link to this function start_link(module, args, options \\ []) View Source

This function is called when a programmer starts his module: Observable.start_link(MyObservable, initial_state)

Link to this function stop_send_to(producer, consumer) View Source

Sends a message to observee_pid that observer_pid no longer wants to be notified of events.

Link to this section Callbacks

Link to this callback handle_done(pid, state) View Source
handle_done(pid :: any(), state :: any()) :: any()
Link to this callback handle_event(message, state) View Source
handle_event(message :: any(), state :: any()) :: any()
Link to this callback init(args) View Source
init(args :: term()) :: any()