• No se han encontrado resultados

Objetivo 5. Determinar la talla crítica (Tc) (Sobreoferta)

In document INFORME FINAL PROYECTO FIP Nº (página 124-132)

TheConsumerAdmininterface defines the behavior supported by objects which create and manage lists of proxy supplier objects within a Notification Service event channel. Recall that a Notification Service event channel can have any number of

ConsumerAdmininstances associated with it. Each such instance is responsible for creating and managing a list of proxy supplier objects that share a common set of QoS

property settings, and a common set of filter objects. This feature enables clients to conveniently group proxy supplier objects within a channel into groupings that each support a set of consumers with a common set of QoS requirements and event subscriptions.

TheConsumerAdmininterface inherits theQoSAdmininterface defined within the

CosNotificationmodule, enabling eachConsumerAdmininstance to manage a set of QoS property settings. These QoS property settings are assigned as the default QoS property settings for any proxy supplier object created by aConsumerAdmin

instance. In addition, theConsumerAdmininterface inherits from theFilterAdmin

interface defined within theCosNotifyFiltermodule, enabling each

ConsumerAdmininstance to maintain a list of filter objects. These filter objects encapsulate subscriptions that will apply to all proxy supplier objects that have been created by a givenConsumerAdmininstance. In order to enable optimizing the notification of a group of proxy supplier objects that have been created by the same

ConsumerAdmininstance of changes to these shared filter objects, the

ConsumerAdmininterface also inherits from theNotifySubscribeinterface defined in theCosNotifyCommmodule. This inheritance enables a

ConsumerAdmininstance to be registered as the callback object for notification of subscription changes made upon filter objects.

TheConsumerAdmininterface defined in theCosNotifyChannelAdminmodule also inherits from theConsumerAdmininterface defined in the

CosEventChannelAdminmodule. This inheritance enables clients to use the

ConsumerAdmininterface defined in theCosNotifyChannelAdminmodule to create pure OMG Event Service style proxy supplier objects. Proxy supplier objects created in this manner may not support configuration of QoS properties, and may not have associated filter objects. In addition, proxy supplier objects created through the inheritedConsumerAdmininterface will not have unique identifiers associated with them, whereas proxy supplier objects created by invoking the operations supported by theConsumerAdmininterface defined in theCosNotifyChannelAdminmodule will.

Locally, theConsumerAdmininterface supports a readonly attribute which maintains a reference to theEventChannelinstance that created a given

ConsumerAdmininstance. TheConsumerAdmininterface also supports a readonly attribute which contains a numeric identifier which will be assigned to an instance supporting this interface by its associated Notification Service event channel upon creation of theConsumerAdmininstance. This identifier will be unique among allConsumerAdmininstances created by a given channel.

As described above, due to inheritance from theFilterAdmininterface, a

ConsumerAdmincan maintain a list of filter objects that will be applied to all proxy suppliers it creates. Also recall that each proxy supplier may itself support a list of filter objects that apply only it. When combining multiple filter objects within each of these two lists of filter objects that may be associated with a given proxy supplier, OR semantics are applied. However when combining these two lists during the evaluation of a given event, either AND or OR semantics may be applied. The choice is

determined by an input flag upon creation of theConsumerAdmin, and the operator that will be used for this purpose by a givenConsumerAdminis maintained in a readonly attribute.

TheConsumerAdmininterface also supports attributes which maintain references to priority and lifetime mapping filter objects. These mapping filter objects will be applied to all proxy supplier objects created by a givenConsumerAdmininstance. EachConsumerAdmininstance assigns a unique numeric identifier to each proxy supplier object it maintains. TheConsumerAdmininterface supports attributes which maintain the list of these unique identifiers associated with the proxy pull and the proxy push suppliers created by a givenConsumerAdmininstance. The

ConsumerAdmininterface also supports an operation which, given the unique identifier of a proxy supplier a givenConsumerAdmininstance has created as input, will return the object reference of that proxy supplier object. Additionally, the

ConsumerAdmininterface supports operations that can create the various styles of proxy supplier objects supported by the Notification Service event channel. Finally, because clients of a given Notification Service event channel can create any number of

ConsumerAdmininstances, adestroyoperation is provided by this interface so that clients can clean up instances that are no longer needed.

3.4.15.1 MyID

TheMyIDattribute is a readonly attribute that maintains the unique identifier of the targetConsumerAdmininstance, which is assigned to it upon creation by the Notification Service event channel.

3.4.15.2 MyChannel

TheMyChannelattribute is a readonly attribute that maintains the object reference of the Notification Service event channel, which created a givenConsumerAdmin

instance.

3.4.15.3 MyOperator

TheMyOperatorattribute is a readonly attribute that maintains the information regarding whether AND or OR semantics will be used during the evaluation of a given event against a set of filter objects, when combining the filter objects associated with the targetConsumerAdminand those defined locally on a given proxy supplier.

3.4.15.4 priority_filter

Thepriority_filterattribute maintains a reference to a mapping filter object that affects the way in which each proxy supplier object created by the target

Note that each proxy supplier object also has an associated attribute that maintains a reference to a mapping filter object for the priority property. If this attribute is set to the reference of a valid mapping filter object, this mapping filter will override that set at the admin level..Otherwise, the mapping filter object referred to by the

priority_filterattribute of theConsumerAdminis used.

3.4.15.5 lifetime_filter

Thelifetime_filterattribute maintains a reference to a mapping filter object that affects the way in which each proxy supplier object created by the target

ConsumerAdmininstance treats each event it receives with respect to lifetime. Note that each proxy supplier object also has an associated attribute that maintains a reference to a mapping filter object for the lifetime property. If this attribute is set to the reference of a valid mapping filter object, this mapping filter will override that set at the admin level. Otherwise, the mapping filter object referred to by the

lifetime_filterattribute of theConsumerAdminis used.

3.4.15.6 pull_suppliers

Thepull_suppliersattribute is a readonly attribute that contains the list of unique identifiers which have been assigned by aConsumerAdmininstance to each pull- style proxy supplier object it has created.

3.4.15.7 push_suppliers

Thepush_suppliersattribute is a readonly attribute that contains the list of unique identifiers which have been assigned by aConsumerAdmininstance to each push- style proxy supplier object it has created.

3.4.15.8 get_proxy_supplier

Theget_proxy_supplieroperation accepts as an input parameter the numeric unique identifier associated with one of the proxy supplier objects that has been created by the targetConsumerAdmininstance. If the input parameter does correspond to the unique identifier of a proxy supplier object that has been created by the target

ConsumerAdmininstance, that proxy supplier object’s reference is returned as the result of the operation. Otherwise, theProxyNotFoundexception is raised.

3.4.15.9 obtain_notification_pull_supplier

Theobtain_notification_pull_supplieroperation can create instances of the various types of pull-style proxy supplier objects defined within the

CosNotifyChannelAdminmodule. Recall that three varieties of pull-style proxy supplier objects are defined within this module:

instances of theProxyPullSupplier interface support connections to pull consumers that receive events as Anys,

instances of theStructuredProxyPullSupplierinterface support connections to pull consumers that receive events as Structured Events, and

instances of theSequenceProxyPullSupplierinterface support connections to pull consumers that receive events as sequences of Structured Events.

Theobtain_notification_pull_supplieroperation thus accepts as an input

parameter a flag that indicates which style of pull-style proxy supplier instance should be created. If the number of consumers currently connected to the channel with which the targetConsumerAdminobject is associated exceeds the value of the

MaxConsumersadministrative property, theAdminLimitExceededexception is raised. Otherwise, the targetConsumerAdmincreates the new pull-style proxy supplier instance and assigns a numeric identifier to it that is unique among all proxy suppliers it has created. The unique identifier is returned as the output parameter of the operation, and the reference to the new proxy supplier instance is returned as the operation result.

3.4.15.10 obtain_notification_push_supplier

Theobtain_notification_push_supplieroperation can create instances of the various types of push-style proxy supplier objects defined within the

CosNotifyChannelAdminmodule. Recall that three varieties of push-style proxy supplier objects are defined within this module:

instances of theProxyPushSupplierinterface support connections to push consumers which receive events as Anys,

instances of theStructuredProxyPushSupplierinterface support connections to push consumers which receive events as Structured Events, and

instances of theSequenceProxyPushSupplier interface support connections to push consumers which receive events as sequences of Structured Events.

Theobtain_notification_push_supplieroperation thus accepts as an input parameter a flag that indicates which style of push-style proxy supplier instance should be created. If the number of consumers currently connected to the channel with which the targetConsumerAdminobject is associated exceeds the value of the

MaxConsumersadministrative property, theAdminLimitExceededexception is raised. Otherwise, the targetConsumerAdmincreates the new push-style proxy supplier instance and assigns a numeric identifier to it that is unique among all proxy suppliers it has created. The unique identifier is returned as the output parameter of the operation, and the reference to the new proxy supplier instance is returned as the operation result.

3.4.15.11 destroy

Thedestroyoperation can be invoked to destroy the targetConsumerAdmin

instance, freeing all resources consumed by the instance. Note thatdestroycan be invoked on aConsumerAdmininstance that is current managing proxy supplier objects that support open connections to consumers. In this case, the effect of invoking

proxy supplier objects being managed by the targetConsumerAdminfrom their consumers, and destroy each of these proxy suppliers. Ultimately, the

ConsumerAdmininstance itself will be destroyed.

In document INFORME FINAL PROYECTO FIP Nº (página 124-132)