com.ibm.wsspi.artifact

Interface ArtifactNotifier


  1. public interface ArtifactNotifier

Nested Class Summary

Modifier and Type Interface and Description
  1. static interface
ArtifactNotifier.ArtifactListener
Implemented by people wanting notifications of changes within Artifacts.
  1. static interface
ArtifactNotifier.ArtifactNotification
Association of paths within a Container.
Note that if the Notification represents a delete, associated paths may not be valid within the container.

Method Summary

Modifier and Type Method and Description
  1. boolean
registerForNotifications(ArtifactNotifier.ArtifactNotification targets,ArtifactNotifier.ArtifactListener callbackObject)
Registers for notifications within the target Containers/Entries
  1. boolean
removeListener(ArtifactNotifier.ArtifactListener listenerToRemove)
Removes a listener from THIS notifier.
  1. boolean
setNotificationOptions(long interval,boolean useMBean)

Method Detail

registerForNotifications

  1. boolean registerForNotifications( ArtifactNotifier.ArtifactNotification targets,
  2. ArtifactNotifier.ArtifactListener callbackObject)
  3. throws java.lang.IllegalArgumentException
Registers for notifications within the target Containers/Entries

You can only register for notifications that are at paths within the container this notifier is from. Attempting to use this Notifier with other Containers or Entries (from unrelated containers, nested containers, or nested nested), will result in an IllegalArgumentException.

Note: listeners should be removed from the same notifier instance they are added to.

Parameters:
targets - the locations to monitor for change
callbackObject - the listener to notify if changes occur to entities in the target collection *
Returns:
true if the registration was successful, false otherwise.
Throws:
java.lang.IllegalArgumentException - if any Container within targets is a new root, or beneath a new root for this notifier, or a container associated with a different notifier.
See Also:

removeListener

  1. boolean removeListener(ArtifactNotifier.ArtifactListener listenerToRemove)
Removes a listener from THIS notifier.

Note: listeners should be removed from the same notifier instance they are added to.

Parameters:
listenerToRemove -
Returns:
true if the listener was removed, false otherwise.
See Also:

setNotificationOptions

  1. boolean setNotificationOptions( long interval,
  2. boolean useMBean)
Parameters:
interval - interval to use in milliseconds. Not used if useMBean is true.
useMBean - true if should use mbean, rather than timed intervals.
Returns:
true if the values given were used, false if options could not be set