org.openorb.notify.impl
Class SupplierAdminImpl
public
class
SupplierAdminImpl
extends SupplierAdminPOA
implements EventReceiver, SupplierAdminManagement, PersistenceManagement
Constructor Summary |
| SupplierAdminImpl(EventChannelImpl channel, ORB orb, POA poa, InterFilterGroupOperator operator, int adminId, int channelId, Property[] qosProperties, Logger logger)
Default constructor. |
| SupplierAdminImpl(EventChannelImpl channel, SupplierAdmin pssSupplierAdmin, POA poa, Logger logger)
Constructor -- used for recovery only |
Method Summary |
int | add_filter(Filter new_filter)
The add_filter operation accepts as input the reference to an
object supporting the
Filter interface. |
boolean | canConnectSupplier()
Method invoked to check if the MaxSuppliers admin property applies |
boolean | canDispatchNewEvent()
Method invoked to check if the MaxQueueLength admin property applies |
void | destroy()
The destroy operation can be invoked to destroy the target
SupplierAdmin instance,
freeing all resources consumed by the instance. |
String | getId()
Get the ID ( ChannelID + ConsumerAdminID ) of the admin |
Object | getNotifyProperty(String key)
Method invoked to get the value of a property defined in the
notification module |
byte[] | getPid()
Returns the pid of the persistent/transient object |
POA | getPOA()
Get the POA |
int[] | get_all_filters()
The get_all_filters operation accepts no input parameters, and returns
the list of unique
identifiers which correspond to all of the filters currently associated
with the target
object.
|
Filter | get_filter(int filterId)
The get_filter operation accepts as input a numeric identifier
that is intended to
correspond to one of the filter objects currently associated with the
target object. |
ProxyConsumer | get_proxy_consumer(int proxyId)
The get_proxy_consumer operation accepts as an input parameter
the numeric unique
identifier associated with one of the proxy consumer objects which has
been created by
the target SupplierAdmin instance. |
Property[] | get_qos()
The get_qos operation takes no input parameters, and returns a
sequence of name-value
pairs which encapsulates the current quality of service
settings for the target
object (which could be an Event Channel, Admin, or Proxy object).
|
boolean | isEventQueueLogged()
TODO |
boolean | isFilterEvaluationLogged()
TODO |
boolean | isProxyMaxPerformance()
The methods returns true if the consumer proxy threads should be
configured as MaxPerformance |
boolean | isQueueMaxPerformance()
The methods returns true if the event queue should be configured
as MaxPerformance |
EventChannel | MyChannel()
The MyChannel attribute is a readonly attribute which maintains the
object reference
of the Notification Service event channel that created a
given SupplierAdmin
instance. |
int | MyID()
The MyID attribute is a readonly attribute which maintains the unique
identifier of the
target SupplierAdmin instance which is assigned to it upon
creation by the
Notification Service event channel. |
InterFilterGroupOperator | MyOperator()
The MyOperator attribute is a readonly attribute which 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 target SupplierAdmin and those defined locally on a given
proxy consumer. |
ProxyConsumer | obtain_notification_pull_consumer(ClientType ctype, IntHolder proxy_id)
The obtain_notification_pull_consumer operation can create
instances of the various
types of pull-style proxy consumer objects defined within the
CosNotifyChannelAdmin module. |
ProxyConsumer | obtain_notification_push_consumer(ClientType ctype, IntHolder proxy_id)
The obtain_notification_push_consumer operation can create
instances of the various
types of push-style proxy consumer objects defined within the
CosNotifyChannelAdmin module. |
ProxyPullConsumer | obtain_pull_consumer()
Operation obtain_pull_consumer |
ProxyPushConsumer | obtain_push_consumer()
Operation obtain_push_consumer |
void | offer_change(EventType[] added, EventType[] removed)
The offer_change operation takes as input two sequences of event type
names: the first
specifying those event types which the client of the operation (an
event supplier) is
informing the target consumer object that it is adding to the list of
event types it plans
to supply, and the second specifying those event types which the client
no longer plans
to supply. |
int[] | pull_consumers()
The pull_consumers attribute is a readonly attribute which contains
the list of unique
identifiers which have been assigned by a SupplierAdmin instance to
each pull-style
proxy consumer object it has created. |
int[] | push_consumers()
The push_consumers attribute is a readonly attribute which contains
the list of unique
identifiers which have been assigned by a SupplierAdmin instance to
each push-style
proxy consumer object it has created. |
void | receiveEvent(Object event)
New event available |
void | remove_all_filters()
The remove_all_filters operation accepts no input parameters, and
removes all filter
objects from the list of those currently associated with
the target object.
|
void | remove_filter(int filterId)
The remove_filter operation accepts as input a numeric value that is
intended to be the
unique identifier of a filter object that is currently associated with
the target object. |
void | reportPullSupplierDisconnection(byte[] proxyPid)
A pull proxy consumer has been destroyed |
void | reportPushSupplierDisconnection(byte[] proxyPid)
A push proxy consumer has been destroyed |
void | reportSupplierConnection()
A proxy consumer has been connected |
void | set_qos(Property[] qos)
The set_qos operation takes as an input parameter a sequence of
name-value pairs
which encapsulates quality of service property settings that a client
is requesting that
the target object (which could be an Event Channel, Admin, or Proxy
object) support
as its default quality of service. |
void | validate_qos(Property[] required_qos, NamedPropertyRangeSeqHolder available_qos)
The validate_qos operation accepts as input a sequence of QoS
property name-value
pairs which specify a set of QoS settings that a client would like to
know if the target
object is capable of supporting. |
Default constructor.
Constructor -- used for recovery only
public int add_filter(
Filter new_filter)
The add_filter operation accepts as input the reference to an
object supporting the
Filter interface. The affect of this operation is that the input filter
object is appended to
the list of filter objects associated with the target object upon which
the operation was
invoked. The operation associates with the newly added filter
object a numeric
identifier that is unique among all filter objects currently associated
with the target,
and returns that value as the result of the operation.
Parameters: new_filter filter to add
Returns: filter id
public boolean canConnectSupplier()
Method invoked to check if the MaxSuppliers admin property applies
public boolean canDispatchNewEvent()
Method invoked to check if the MaxQueueLength admin property applies
public void destroy()
The destroy operation can be invoked to destroy the target
SupplierAdmin instance,
freeing all resources consumed by the instance. Note that destroy can
be invoked on a
SupplierAdmin instance that is current managing proxy consumer
objects that support
open connections to suppliers. In this case, the effect of
invoking destroy on the
SupplierAdmin is that the operation will disconnect each of
the proxy consumer
objects being managed by the target SupplierAdmin from their
suppliers, and destroy
each of these proxy consumers. Ultimately, the SupplierAdmin
instance itself will be
destroyed.
public String getId()
Get the ID ( ChannelID + ConsumerAdminID ) of the admin
public Object getNotifyProperty(String key)
Method invoked to get the value of a property defined in the
notification module
public byte[] getPid()
Returns the pid of the persistent/transient object
public POA getPOA()
Get the POA
public int[] get_all_filters()
The get_all_filters operation accepts no input parameters, and returns
the list of unique
identifiers which correspond to all of the filters currently associated
with the target
object.
Returns: Array of all filters's id
public
Filter get_filter(int filterId)
The get_filter operation accepts as input a numeric identifier
that is intended to
correspond to one of the filter objects currently associated with the
target object. If this
is the case, the object reference of the corresponding filter
object is returned.
Otherwise, the FilterNotFound exception is raised.
Parameters: filterId Id of the filter to get.
Returns: The filter object.
Throws: org.omg.CosNotifyFilter.FilterNotFound Id doesn't
match to any filter.
The get_proxy_consumer operation accepts as an input parameter
the numeric unique
identifier associated with one of the proxy consumer objects which has
been created by
the target SupplierAdmin instance. If the input parameter does
correspond to the
unique identifier of a proxy consumer object that has been
created by the target
SupplierAdmin instance, that proxy consumer object?s reference is
returned as the
result of the operation. Otherwise, the ProxyNotFound
exception is raised.
The get_qos operation takes no input parameters, and returns a
sequence of name-value
pairs which encapsulates the current quality of service
settings for the target
object (which could be an Event Channel, Admin, or Proxy object).
Returns: Object QosProperties
public boolean isEventQueueLogged()
TODO
public boolean isFilterEvaluationLogged()
TODO
public boolean isProxyMaxPerformance()
The methods returns true if the consumer proxy threads should be
configured as MaxPerformance
public boolean isQueueMaxPerformance()
The methods returns true if the event queue should be configured
as MaxPerformance
The MyChannel attribute is a readonly attribute which maintains the
object reference
of the Notification Service event channel that created a
given SupplierAdmin
instance.
public int MyID()
The MyID attribute is a readonly attribute which maintains the unique
identifier of the
target SupplierAdmin instance which is assigned to it upon
creation by the
Notification Service event channel.
The MyOperator attribute is a readonly attribute which 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 target SupplierAdmin and those defined locally on a given
proxy consumer.
The obtain_notification_pull_consumer operation can create
instances of the various
types of pull-style proxy consumer objects defined within the
CosNotifyChannelAdmin module. Recall that three varieties of
pull-style proxy
consumer objects are defined within this module: instances of the
ProxyPullConsumer interface support connections to pull suppliers
which send events
as Anys, instances of the StructuredProxyPullConsumer interface support
connections to pull suppliers which send events as Structured Events,
and instances of
the SequenceProxyPullConsumer interface support connections
to pull suppliers
which send events as sequences of Structured Events.
The obtain_notification_pull_consumer operation thus accepts as an
input parameter a
flag which indicates which style of pull-style proxy consumer
instance should be
created. If the number of suppliers currently connected to the
channel with which the
target SupplierAdmin object is associated exceeds the value of
the MaxSuppliers
administrative property, the AdminLimitExceeded exception is
raised. Otherwise, the
target SupplierAdmin creates the new pull-style proxy consumer
instance and assigns
a numeric identifier to it that is unique among all proxy consumers it
has created. The
unique identifier is returned as the output parameter of the operation,
and the reference
to the new proxy consumer instance is returned as the operation result.
The obtain_notification_push_consumer operation can create
instances of the various
types of push-style proxy consumer objects defined within the
CosNotifyChannelAdmin module. Recall that three varieties of
push-style proxy
consumer objects are defined within this module: instances of the
ProxyPushConsumer interface support connections to push
suppliers which send
events as Anys, instances of the StructuredProxyPushConsumer
interface support
connections to push suppliers which send events as Structured Events,
and instances of
the SequenceProxyPushConsumer interface support connections
to push suppliers
which send events as sequences of Structured Events.
The obtain_notification_push_consumer operation thus accepts as an
input parameter a
flag which indicates which style of push-style proxy consumer
instance should be
created. If the number of suppliers currently connected to the
channel with which the
target SupplierAdmin object is associated exceeds the value of
the MaxSuppliers
administrative property, the AdminLimitExceeded exception is
raised. Otherwise, the
target SupplierAdmin creates the new push-style proxy consumer
instance and assigns
a numeric identifier to it that is unique among all proxy consumers it
has created. The
unique identifier is returned as the output parameter of the operation,
and the reference
to the new proxy consumer instance is returned as the operation result.
Operation obtain_pull_consumer
Operation obtain_push_consumer
The offer_change operation takes as input two sequences of event type
names: the first
specifying those event types which the client of the operation (an
event supplier) is
informing the target consumer object that it is adding to the list of
event types it plans
to supply, and the second specifying those event types which the client
no longer plans
to supply. This operation raises the InvalidEventType exception if one
of the event type
names supplied in either input parameter is syntactically invalid.
In this case, the
invalid name is returned in the type field of the exception.
Note that each event type name is comprised of two components:
the name of the
domain in which the event type has meaning, and the name of the
actual event type.
Also note that either component of a type name may specify a
complete domain/event
type name, a domain/event type name containing the wildcard ??
character, or the
special event type name ?%ALL? described in section 2.6.5 if
the specification
public int[] pull_consumers()
The pull_consumers attribute is a readonly attribute which contains
the list of unique
identifiers which have been assigned by a SupplierAdmin instance to
each pull-style
proxy consumer object it has created.
public int[] push_consumers()
The push_consumers attribute is a readonly attribute which contains
the list of unique
identifiers which have been assigned by a SupplierAdmin instance to
each push-style
proxy consumer object it has created.
public void receiveEvent(Object event)
New event available
public void remove_all_filters()
The remove_all_filters operation accepts no input parameters, and
removes all filter
objects from the list of those currently associated with
the target object.
public void remove_filter(int filterId)
The remove_filter operation accepts as input a numeric value that is
intended to be the
unique identifier of a filter object that is currently associated with
the target object. If
identifier supplied does correspond to a filter object currently
associated with the target
object, then the corresponding filter object will be removed from the
list of filters
associated with the target object. Otherwise, the FilterNotFound
exception will be
raised.
Parameters: filterId Id of the filter.
Throws: org.omg.CosNotifyFilter.FilterNotFound Id doesn't
match to any filter
public void reportPullSupplierDisconnection(byte[] proxyPid)
A pull proxy consumer has been destroyed
public void reportPushSupplierDisconnection(byte[] proxyPid)
A push proxy consumer has been destroyed
public void reportSupplierConnection()
A proxy consumer has been connected
The set_qos operation takes as an input parameter a sequence of
name-value pairs
which encapsulates quality of service property settings that a client
is requesting that
the target object (which could be an Event Channel, Admin, or Proxy
object) support
as its default quality of service. If the implementation of the
target object is not
capable of supporting any of the requested quality of service settings,
or if any of the
requested settings would be in conflict with a QoS property defined at
a higher level of
the object hierarchy with respect to QoS , the UnsupportedQoS
exception is raised. This exception contains as data a sequence of data
structures, each
of which identifies the name of a QoS property in the input list whose
requested setting
could not be satisfied, along with an error code and a range of
settings for the property
which could be satisfied. The meanings of the error codes which might
be returned are
described in Table 2-5 of CosNotification Service specification
Parameters: qos QosProperties to assign to object
Throws: org.omg.CosNotification.UnsupportedQoS
The validate_qos operation accepts as input a sequence of QoS
property name-value
pairs which specify a set of QoS settings that a client would like to
know if the target
object is capable of supporting. If the any of the requested
settings could not be
satisfied by the target object, the operation raises the
UnsupportedQoS exception.
This exception contains as data a sequence of data structures, each of
which identifies
the name of a QoS property in the input list whose requested
setting could not be
satisfied, along with an error code and a range of settings for the
property which could
be satisfied. The meanings of the error codes which might be returned
are described in
Table 2-5.
If all requested QoS property value settings could be satisfied by the
target object, the
operation returns successfully (without actually setting the QoS
properties on the target
object) with an output parameter that contains a sequence of
PropertyRange data
structures. Each element in this sequence includes the name of a
an additional QoS
property supported by the target object which could have been
included on the input
list and resulted in a successful return from the operation., along
with the range of
values that would have been acceptable for each such property.
Parameters: required_qos available_qos
Throws: org.omg.CosNotification.UnsupportedQoS