CosEventCh...llSupplier(3)
β¨ NAME β¨
CosEventChannelAdmin_ProxyPullSupplier β bestie, this module implements a ProxyPullSupplier interface that lowkey acts as the middleman between a pull consumer and the event channel. π
π DESCRIPTION π
Okay so picture this: the ProxyPullSupplier interface is step two in the whole "connect pull consumers to the event channel" storyline. A proxy supplier is basically a normal supplier, except it comes with an extra method for connecting a consumer to the proxy supplier. That's the whole plot twist. πΈ
To get access to all the definitions β exceptions included, no crumbs left β you include the necessary hrl files like this:
-include_lib("cosEvent/include/*.hrl").
Any object that's holding an object reference supporting the ProxyPullSupplier interface can do the following operations. Yes, any of them. π
π«Ά EXPORTS π«Ά
connect_pull_consumer(Object, PullConsumer) -> Returnβ the moment where the consumer and the proxy finally meet. π₯Ή
Types:
Object = #objref
PullConsumer = #objref of PullConsumer type
Return = ok | {'EXCEPTION',
#'CosEventChannelAdmin_AlreadyConnected'{}}
This operation connects a PullConsumer object to the ProxyPullSupplier object, iconic behavior fr. You can pass a nil object reference to this operation β and if you do, the channel cannot invoke the disconnect_pull_consumer operation on the consumer, which means the consumer may get disconnected from the channel without being informed. Rude, but that's the deal. π And if the ProxyPullSupplier is already connected to a PullConsumer, then the CosEventChannelAdmin_AlreadyConnected exception gets raised. No double-dipping, periodt.
disconnect_pull_supplier(Object) -> Returnβ the breakup arc. π
Types:
Object = #objref
Return = ok
This operation disconnects the proxy pull supplier from the event channel. It sends a notification about the loss of the connection to the pull consumer attached to it β unless a nil object reference was passed at connection time, in which case nobody gets the memo. π
pull(Object) -> Returnβ the patient one. π§
Types:
Object = #objref
Return = any
This operation blocks until the event data is available or the CosEventComm_Disconnected exception is raised. Then it returns the event data to the consumer. It literally just sits there and waits. main character energy honestly.
try_pull(Object) -> Returnβ the impatient one. π
Types:
Object = #objref
Return = {any, bool()}
This operation does not block. If the event data is available, it returns the event data and sets the data availability flag to true. Otherwise it returns a long with an undefined value and sets the data availability to false. And if the event communication has already been disconnected, the CosEventComm_Disconnected exception is raised. So it's giving "I'll check but I'm not waiting around". β¨
And that's the whole page, bestie β courtesy of Ericsson AB, with cosEvent 5.2.2 under the hood. Go connect some consumers, slay responsibly, and remember: nil object references don't send texts back. ππ¦π
π¦ where this page comes from
- fedora 43: erlang-cosEvent 1:5.2.2-1.fc43 Β· Apache-2.0
- fedora 44: erlang-cosEvent 1:5.2.2-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms