CosEventCh...shConsumer(3)

πŸ“¦
version 5.2.2 Β· 2 versions
, in fedora 43, fedora 44

πŸ’– NAME πŸ’–

ok so bestie, this page is CosEventCh...shConsumer(3) from the Erlang manual (it's an Erlang Module Definition, iykyk), and the star of the show is CosEventChannelAdmin_ProxyPushConsumer β€” a module that implements a ProxyPushConsumer interface, which is basically the middleman between a push supplier and the event channel. the way it just... sits in the middle and relays vibes ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so listen. The ProxyPushConsumer interface is the second step for connecting push suppliers to the event channel. A proxy consumer is giving normal consumer, but it has that extra little something: an additional method for connecting a supplier to the proxy consumer. it's the consumer with a plus-one 🫢

To get access to all definitions β€” like, e.g., exceptions β€” you gotta include the necessary hrl files, like this:

-include_lib("cosEvent/include/*.hrl").

no cap, do it or nothing works.

Any object that possesses an object reference that supports the ProxyPushConsumer interface can perform the following operations πŸ‘‘ (and honestly? iconic behaviour)


⭐ EXPORTS ⭐

  • connect_push_supplier(Object, PushSupplier) -> Return

Types:

Object = #objref
PushSupplier = #objref of PushSupplier type
Return = ok | {'EXCEPTION',
#'CosEventChannelAdmin_AlreadyConnected'{}}

This operation connects the PushSupplier object to the ProxyPushConsumer object. now β€” a nil object reference can be passed to this operation, fr fr. If you do that, the channel cannot invoke the disconnect_push_supplier operation on the supplier, which means the supplier may be disconnected from the channel without being informed 😭 (imagine being ghosted by an event channel, couldn't be me). And if the ProxyPushConsumer is already connected to a PushSupplier, then the CosEventChannelAdmin_AlreadyConnected exception gets raised. no double-dipping bestie πŸ’…

  • disconnect_push_consumer(Object) -> Return

Types:

Object = #objref
Return = ok

This operation disconnects the proxy push consumer from the event channel. It sends a notification about the loss of the connection to the push supplier attached to it β€” unless a nil object reference was passed at the connection time (in which case, bestie, nobody gets told anything πŸ™ˆ).

  • push(Object, Data) -> Return

Types:

Object = #objref
Data = any
Return = ok | {'EXCEPTION', #'CosEventComm_Disconnected'{}}

This operation sends event data to all connected consumers via the event channel. and if the event communication has already been disconnected? then the CosEventComm_Disconnected gets raised. periodt. πŸ’€


okay that's the whole page bestie, you ate that reading sesh πŸ’–βœ¨

this gorgeous little manpage is brought to you by Ericsson AB and it's from cosEvent version 5.2.2 β€” mwah, thanks for coming to my ted talk, go connect some suppliers πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from