COSNOTIFYCHANNELADMIN_PROXYCONSUMER(3erl)

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

πŸ’– NAME πŸ’–

CosNotifyChannelAdmin_ProxyConsumer β€” okay bestie, this module is the whole implementation of the OMG CosNotifyChannelAdmin::ProxyConsumer interface. That's it, that's the vibe. πŸ¦‹


✨ DESCRIPTION ✨

So you want access to the record definitions for all these structures? Say less. You literally just drop this include in and you're golden:

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

Not me also spilling that this module exports the functions described in these two other modules too β€” go read those, iykyk:

  • CosNotification_QoSAdmin
  • CosNotifyFilter_FilterAdmin

πŸŽ€ EXPORTS πŸŽ€

πŸ’… _get_MyType(ProxyConsumer) -> ProxyType

Types:

ProxyConsumer = #objref
ProxyType = 'PUSH_ANY' | 'PULL_ANY' | 'PUSH_STRUCTURED' |
'PULL_STRUCTURED' | 'PUSH_SEQUENCE' | 'PULL_SEQUENCE'

This is a readonly attribute and what it does is hold onto the enumerant that describes which type the target object actually is. Periodt. πŸ‘‘

🌸 _get_MyAdmin(ProxyConsumer) -> AdminObject

Types:

ProxyConsumer = AdminObject = #objref

Another readonly attribute, and this one keeps the admin's reference β€” like, the reference of the admin that created the target object. Main character admin energy. ✨

🧚 obtain_subscription_types(ProxyConsumer, ObtainInfoMode) -> EventTypeSeq

Types:

ProxyConsumer = #objref
ObtainInfoMode = 'ALL_NOW_UPDATES_OFF' | 'ALL_NOW_UPDATES_ON'
| 'NONE_NOW_UPDATES_OFF' | 'NONE_NOW_UPDATES_ON'
EventTypeSeq = [EventType]
EventType = #'CosNotification_EventType'{domain_name,
type_name}
domain_name = type_name = string()

Depending on whatever you pass in as ObtainInfoMode, this operation may hand you back a sequence of the EventTypes that the target object is interested in receiving. Let's break it down because it's giving very much "read the fine print":

  • If you give it 'ALL_NOW_UPDATES_OFF' or 'ALL_NOW_UPDATES_ON' β€” congrats, you get a sequence back. Otherwise, nope, no sequence for you. 😭
  • If you issue 'ALL_NOW_UPDATES_OFF' or 'NONE_NOW_UPDATES_OFF' β€” the target object will not inform the associated NotifySubscribe object when an update occurs.
  • 'ALL_NOW_UPDATES_ON' or 'NONE_NOW_UPDATES_ON' β€” this one results in update information actually being sent. Slay. πŸ’«

🫢 validate_event_qos(ProxyConsumer, QoSProperties) -> Reply

Types:

ProxyConsumer = #objref
QoSProperties = [QoSProperty]
QoSProperty = #'CosNotification_Property'{name, value}
name = string()
value = #any
Reply = {ok, NamedPropertyRangeSeq} | {'EXCEPTION',
CosNotification_UnsupportedQoS{qos_err}}
NamedPropertyRangeSeq = [NamedPropertyRange]
NamedPropertyRange = #CosNotification_NamedPropertyRange{name,
range}
name = string()
range = #CosNotification_PropertyRange{low_val, high_val}
low_val = #any
high_val = #any
qos_err = PropertyErrorSeq
PropertyErrorSeq = [PropertyError]
PropertyError = #'CosNotification_PropertyError'{code, name,
available_range}
code = 'UNSUPPORTED_PROPERTY' | 'UNAVAILABLE_PROPERTY' |
'UNSUPPORTED_VALUE' | 'UNAVAILABLE_VALUE' | 'BAD_PROPERTY' |
'BAD_TYPE' | 'BAD_VALUE'
name = string()
available_range = PropertyRange
PropertyRange = #CosNotification_PropertyRange{low_val,
high_val}
low_val = high_val = #any

Wanna know if certain Quality of Service properties can be added to events in the current context of the target object? Bestie, this is literally the operation you use for that. And if the required settings just can't be supported β€” an exception gets raised describing exactly why. No cap, it tells you. πŸ’€


Real talk though: those code values are all exact, so don't go free-styling your own β€” 'UNSUPPORTED_PROPERTY', 'UNAVAILABLE_PROPERTY', 'UNSUPPORTED_VALUE', 'UNAVAILABLE_VALUE', 'BAD_PROPERTY', 'BAD_TYPE', 'BAD_VALUE'. Copy them character for character or the vibe check fails. πŸ“

And that's the whole page, bestie!! 🌈 This icon was brought to you by Ericsson AB, running the cosNotification 5.2.2 era of CosNotifyChannelAdmin_ProxyConsumer(3erl). Stay iconic, go read your .hrl files, mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from