public interface Subscriber
Allows a Transformer module to subscribe, and unsubscribe, listeners interested in receiving updates for objects that match a particular name pattern, or are of a specific object type.
Modifier and Type | Field and Description |
---|---|
static int |
F_DEFAULT
Default Subscriber flag.
|
static int |
F_LISTENER_ACCESSORY
Setting this flag on subscribe will cause the subscriber to behave as an accessory listener.
|
Modifier and Type | Method and Description |
---|---|
void |
addSubscriptionListener(Collection<String> objectNamePatterns,
SubscriptionListener listener)
Adds the subscription listener for the specified object name
patterns and returns the current data for those objects to the listener.
|
void |
addSubscriptionListener(Collection<String> objectNamePatterns,
SubscriptionListener listener,
int subscriptionFlags)
Adds the subscription listener for the specified object name
patterns and returns the current data for those objects to the listener.
|
void |
addSubscriptionListener(ObjectType objectType,
SubscriptionListener listener)
Adds the subscription listener for the specified object type
and returns the current data for that object to the listener.
|
void |
addSubscriptionListener(ObjectType objectType,
SubscriptionListener listener,
int subscriptionFlags)
Adds the subscription listener for the specified object type
and returns the current data for that object to the listener.
|
void |
addSubscriptionListener(String objectNamePattern,
SubscriptionListener listener)
Adds the subscription listener for the specified object name
pattern and returns the current data for that object to the listener.
|
void |
addSubscriptionListener(String objectNamePattern,
SubscriptionListener listener,
int subscriptionFlags)
Adds the subscription listener for the specified object name
pattern and returns the current data for that object to the listener.
|
void |
removeSubscriptionListener(Collection<String> objectNamePatterns,
SubscriptionListener listener)
Removes the subscription listener for the specified object name
patterns.
|
void |
removeSubscriptionListener(ObjectType objectType,
SubscriptionListener listener)
Removes the subscription listener for the specified object
type.
|
void |
removeSubscriptionListener(String objectNamePattern,
SubscriptionListener listener)
Removes the subscription listener for the specified object name
pattern.
|
static final int F_DEFAULT
static final int F_LISTENER_ACCESSORY
void addSubscriptionListener(String objectNamePattern, SubscriptionListener listener)
Adds the subscription listener for the specified object name pattern and returns the current data for that object to the listener. The listener will now be informed of all the updates for any object with a name that matches the pattern.
A listener can be added for multiple subscriptions, so that it
can be called several times for the same object update. For
example, an update to the record /LO/VOD will result in the update
method being invoked three times for a listener that has been
registered for the pattern /??/VOD, for the pattern /LO/* and for
the object type record.
objectNamePattern
- The object name pattern
the listener was subscribed with.listener
- The listener that should be informed when
an update occurs for an object with a name
that matches the specified pattern.NullPointerException
- If either the objectNamePattern or
listener arguments are null.void addSubscriptionListener(String objectNamePattern, SubscriptionListener listener, int subscriptionFlags)
Adds the subscription listener for the specified object name pattern and returns the current data for that object to the listener. The listener will now be informed of all the updates for any object with a name that matches the pattern.
A listener can be added for multiple subscriptions, so that it
can be called several times for the same object update. For
example, an update to the record /LO/VOD will result in the update
method being invoked three times for a listener that has been
registered for the pattern /??/VOD, for the pattern /LO/* and for
the object type record.
objectNamePattern
- The object name pattern
the listener was subscribed with.listener
- The listener that should be informed whensubscriptionFlags
- Enables flags to be set for this subscription. Settable flags include
F_DEFAULT
, F_LISTENER_ACCESSORY
.
an update occurs for an object with a name
that matches the specified pattern.NullPointerException
- If either the objectNamePattern or
listener arguments are null.void addSubscriptionListener(Collection<String> objectNamePatterns, SubscriptionListener listener, int subscriptionFlags)
Adds the subscription listener for the specified object name patterns and returns the current data for those objects to the listener. The listener will now be informed of all the updates for any object with a name that matches any of the patterns.
A listener can be added for multiple subscriptions, so that it
can be called several times for the same object update. For
example, an update to the record /LO/VOD will result in the update
method being invoked three times for a listener that has been
registered for the pattern /??/VOD, for the pattern /LO/* and for
the object type record.
objectNamePatterns
- A Collection of object name patterns
the listener was subscribed with.listener
- The listener that should be informed when
an update occurs for an object with a name
that matches the specified pattern.subscriptionFlags
- Enables flags to be set for this subscription. Settable flags include
F_DEFAULT
, F_LISTENER_ACCESSORY
NullPointerException
- If either the objectNamePattern or
listener arguments are null.void addSubscriptionListener(ObjectType objectType, SubscriptionListener listener, int subscriptionFlags)
Adds the subscription listener for the specified object type and returns the current data for that object to the listener. The listener will now be informed of all the updates for any object of that type.
A listener can be added for multiple subscriptions, so that it
can be called several times for the same object update. For
example, an update to the record /LO/VOD will result in the update
method being invoked three times for a listener that has been
registered for the pattern /??/VOD, for the pattern /LO/* and for
the object type record.
objectType
- The type of object the listener is interested
in.listener
- The listener that should be informed when an
update occurs for any object of the specified
type.subscriptionFlags
- Enables flags to be set for this subscription. Settable flags include
F_DEFAULT
, F_LISTENER_ACCESSORY
NullPointerException
- If either the objectType or listener
arguments are null.void addSubscriptionListener(Collection<String> objectNamePatterns, SubscriptionListener listener)
Adds the subscription listener for the specified object name patterns and returns the current data for those objects to the listener. The listener will now be informed of all the updates for any object with a name that matches any of the patterns.
A listener can be added for multiple subscriptions, so that it
can be called several times for the same object update. For
example, an update to the record /LO/VOD will result in the update
method being invoked three times for a listener that has been
registered for the pattern /??/VOD, for the pattern /LO/* and for
the object type record.
objectNamePatterns
- A Collection of object name patterns
the listener was subscribed with.listener
- The listener that should be informed when
an update occurs for an object with a name
that matches the specified pattern.NullPointerException
- If either the objectNamePattern or
listener arguments are null.void addSubscriptionListener(ObjectType objectType, SubscriptionListener listener)
Adds the subscription listener for the specified object type and returns the current data for that object to the listener. The listener will now be informed of all the updates for any object of that type.
A listener can be added for multiple subscriptions, so that it
can be called several times for the same object update. For
example, an update to the record /LO/VOD will result in the update
method being invoked three times for a listener that has been
registered for the pattern /??/VOD, for the pattern /LO/* and for
the object type record.
objectType
- The type of object the listener is interested
in.listener
- The listener that should be informed when an
update occurs for any object of the specified
type.NullPointerException
- If either the objectType or listener
arguments are null.void removeSubscriptionListener(String objectNamePattern, SubscriptionListener listener)
Removes the subscription listener for the specified object name pattern. If the listener was added multiple times for the specified object name pattern, then only the first instance will be removed.
objectNamePattern
- The object name pattern
the listener was subscribed with.listener
- The listener that had been subscribed for
the specified pattern.NullPointerException
- If either the objectNamePattern or
listener arguments are null.void removeSubscriptionListener(Collection<String> objectNamePatterns, SubscriptionListener listener)
Removes the subscription listener for the specified object name patterns. If the listener was added multiple times for the specified object name pattern, then only the first instance will be removed.
objectNamePatterns
- The object name patterns
the listener was subscribed with.listener
- The listener that had been subscribed for
the specified pattern.NullPointerException
- If either the objectNamePattern or
listener arguments are null.void removeSubscriptionListener(ObjectType objectType, SubscriptionListener listener)
Removes the subscription listener for the specified object type. If the listener was added multiple times for the specified object type, then only the first instance will be removed.
objectType
- The type of object the listener was subscribed
with.listener
- The listener that had been subscribed for the
specified object type.NullPointerException
- If either the objectType or listener
arguments are null.Please send bug reports and comments to Caplin support