org.openorb.notify.impl
Class StructuredProxyPullConsumerImpl
public
class
StructuredProxyPullConsumerImpl
extends StructuredProxyPullConsumerPOA
implements SupplierProxyManagement, PersistenceManagement
The FilterFactory interface defines operations for creating filter objects.
This filter objects will be persistent if the connection reliability is set
to persistent.
Author: Olivier Modica
Method Summary |
int | add_filter(Filter new_filter)
The add_filter operation accepts as input the reference to an object supporting the
Filter interface. |
void | connect_structured_pull_supplier(StructuredPullSupplier pull_supplier)
The connect_structured_pull_supplier operation accepts as an input
parameter the reference to an object supporting the StructuredPullSupplier
interface defined within the CosNotifyComm module. |
void | disconnect_structured_pull_consumer()
The disconnect_structured_pull_consumer operation is invoked to terminate a
connection between the target StructuredPullConsumer, and its associated supplier.
|
String | getId()
Get the ID ( ChannelID + SupplierAdminID + ProxyConsumerID ) of the proxy |
byte[] | getPid()
Returns the pid of the persistent/transient object |
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 filter)
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. |
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).
|
SupplierAdmin | MyAdmin()
The MyAdmin attribute is a readonly attribute that should be set upon creation of each
proxy consumer instance to maintain the reference of the instance supporting the
SupplierAdmin interface that created it. |
ProxyType | MyType()
The MyType attribute is a readonly attribute that should be set upon creation of each
proxy consumer instance to indicate the specific type of proxy consumer the instance
represents.Enumerations are possible to distinguish the type of proxy consumer among
the following possibilities: ProxyPushConsumer, ProxyPullConsumer,
StructuredProxyPushConsumer, StructuredProxyPullConsumer,
SequenceProxyPushConsumer, and SequenceProxyPullConsumer.
|
EventType[] | obtain_subscription_types(ObtainInfoMode mode)
The obtain_subscription_types operation returns a list of event type names. |
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. |
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 filter)
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 | reportClientDisconnection()
This method is invoked when the client returns
an unexpected Disconnected exception. |
void | resume_connection()
The resume_connection operation causes the target object supporting the
StructuredProxyPullConsumer interface to resume attempting to pull events (using
pull or try_pull) from the StructuredPullSupplier instance connected to it. |
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 | suspend_connection()
The suspend_connection operation causes the target object supporting the
StructuredProxyPullConsumer interface to stop attempting to pull events (using pull
or try_pull) from the StructuredPullSupplier instance connected to it. |
void | validate_event_qos(Property[] required_qos, NamedPropertyRangeSeqHolder available_qos)
The validate_event_qos operation accepts as input a sequence of QoS property name-value
pairs which specify a set of QoS settings that a client is interested in setting on a
per-event basis. |
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
The connect_structured_pull_supplier operation accepts as an input
parameter the reference to an object supporting the StructuredPullSupplier
interface defined within the CosNotifyComm module. This reference is that
of a supplier which plans to make events available for pulling to the
channel with which the target object is associated in the form of
Structured Events. This operation is thus invoked in order to establish a
connection between a pull-style supplier of events in the form of Structured Events,
and the notification channel. Once established, the channel can proceed to receive
events from the supplier by invoking the pull_structured_event or
try_pull_structured_event operations supported by the supplier (whether the channel
will invoke pull_structured_event or try_pull_structured_event, and the frequency with
which it will perform such invocations, is a detail which is specific to the
implementation of the channel). If the target object of this operation is already
connected to a pull supplier object, the AlreadyConnected exception will be raised.
An implementation of the StructuredProxyPullConsumer interface may impose
additional requirements on the interface supported by a pull supplier (e.g., it may be
designed to invoke some operation other than pull_structured_event or
try_pull_structured_event in order to receive events). If the pull supplier being
connected does not meet those requirements, this operation raises the TypeError
exception.
Parameters: pull_supplier Pull supplier to connect to the proxy.
Throws: org.omg.CosEventChannelAdmin.AlreadyConnected The proxy is already connected. org.omg.CosEventChannelAdmin.TypeError ?
public void disconnect_structured_pull_consumer()
The disconnect_structured_pull_consumer operation is invoked to terminate a
connection between the target StructuredPullConsumer, and its associated supplier.
This operation takes no input parameters and returns no values. The result of this
operation is that the target StructuredPullConsumer will release all resources it had
allocated to support the connection, and dispose its own object reference.
public String getId()
Get the ID ( ChannelID + SupplierAdminID + ProxyConsumerID ) of the proxy
public byte[] getPid()
Returns the pid of the persistent/transient object
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 filter)
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: filter Id of the filter to get
Returns: The filter object
Throws: org.omg.CosNotifyFilter.FilterNotFound Id doesn't match to any filter
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
The MyAdmin attribute is a readonly attribute that should be set upon creation of each
proxy consumer instance to maintain the reference of the instance supporting the
SupplierAdmin interface that created it.
The MyType attribute is a readonly attribute that should be set upon creation of each
proxy consumer instance to indicate the specific type of proxy consumer the instance
represents.Enumerations are possible to distinguish the type of proxy consumer among
the following possibilities: ProxyPushConsumer, ProxyPullConsumer,
StructuredProxyPushConsumer, StructuredProxyPullConsumer,
SequenceProxyPushConsumer, and SequenceProxyPullConsumer.
The obtain_subscription_types operation returns a list of event type names. This
returned list represents the names of event types which consumers connected to the
channel are interested in receiving. Consumers express their interest in receiving
particular types of events by configuring filters associated with the proxy suppliers to
which they are connected to encapsulate constraints which express subscriptions to
specific event instances. Such subscriptions could be based on the types and/or
contents of events. The proxy suppliers extract the event type information from these
subscriptions, and share it with the proxy consumer objects connected to the same
channel. Supplier objects can thus obtain this information from the channel by
invoking the obtain_subscription_types operation on the proxy consumer object to
which they are connected. This information enables suppliers to suppress sending types
of events to the channel in which no consumer is currently interested.
Note that suppliers can also receive updates to subscription information automatically
by enabling the channel to invoke the subscription_change operation they support
through inheritence of the CosNotifyComm::NotifySubscribe interface each time a
new type of event is added or removed through modification of filters. The
obtain_subscription_types operation accepts as input a flag that enables
synchronization between the subscription information obtain through these automatic
updates, and that obtained through invocation of obtain_subscription_types. The table
below summarizes the possible values and associated meanings this flag can take on:
Parameters: mode Mode of recuperation
Returns: All subscription types
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 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 filter)
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: filter Id of the filter
Throws: org.omg.CosNotifyFilter.FilterNotFound Id doesn't match to any filter
public void reportClientDisconnection()
This method is invoked when the client returns
an unexpected Disconnected exception. Then the proxy
should invoke disconnect on itself and release all resources.
public void resume_connection()
The resume_connection operation causes the target object supporting the
StructuredProxyPullConsumer interface to resume attempting to pull events (using
pull or try_pull) from the StructuredPullSupplier instance connected to it. This
operation takes no input parameters and returns no values. If the connection has not
been previously suspended using this operation by invoking suspend_connection
(described above), the ConnectionAlreadyActive exception is raised. If no
StructuredPullSupplier has been connected to the target object when this operation is
invoked, the NotConnected exception is raised. Otherwise, the
StructuredProxyPullConsumer will resume attempting to pull events from the
StrucuturedPullSupplier connected to it.
Throws: org.omg.CosNotifyChannelAdmin.ConnectionAlreadyActive Connection
is already active. org.omg.CosNotifyChannelAdmin.NotConnected Proxy isn't 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
public void suspend_connection()
The suspend_connection operation causes the target object supporting the
StructuredProxyPullConsumer interface to stop attempting to pull events (using pull
or try_pull) from the StructuredPullSupplier instance connected to it. This operation
takes no input parameters and returns no values. If the connection has been previously
suspended using this operation and not resumed by invoking resume_connection
(described below), the ConnectionAlreadyInactive exception is raised. If no
StructuredPullSupplier has been connected to the target object when this operation is
invoked, the NotConnected exception is raised. Otherwise, the
StructuredProxyPullConsumer will not attempt to pull events from the
StructuredPullSupplier connected to it until resume_connection is subsequently
invoked.
Throws: org.omg.CosNotifyChannelAdmin.ConnectionAlreadyInactive Connection is
already suspended. org.omg.CosNotifyChannelAdmin.NotConnected Proxy isn't connected.
The validate_event_qos operation accepts as input a sequence of QoS property name-value
pairs which specify a set of QoS settings that a client is interested in setting on a
per-event basis. Note that the QoS property settings contained in the optional header
fields of a Structured Event may differ from those that are configured on a given proxy
object. This operation is essentially a check to see if the target proxy object will honor
the setting of a set of QoS properties on a per-event basis to values that may conflict
with those set on the proxy itself. If any of the requested settings would not be honored
by the target object on a per-event basis, 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 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 whose setting is supported by the target object on a per-event
basis and which could have been included on the input list while still resulting in
a successful return from the operation. Each element also includes the range of values
that would have been acceptable for each such property.
Parameters: required_qos available_qos
Throws: org.omg.CosNotification.UnsupportedQoS
Qos Property was not supported in this implementation
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