org.jboss.system.filterfactory
Class DeploymentInfoNotificationFilterFactory.DeploymentInfoNotificationFilter

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationFilterSupport
      extended by org.jboss.system.filterfactory.DeploymentInfoNotificationFilterFactory.DeploymentInfoNotificationFilter
All Implemented Interfaces:
Serializable, javax.management.NotificationFilter
Enclosing class:
DeploymentInfoNotificationFilterFactory

public static class DeploymentInfoNotificationFilterFactory.DeploymentInfoNotificationFilter
extends org.jboss.mx.util.JBossNotificationFilterSupport

A NotificationFilter that can filter Notifications that carry a DeploymentInfo payload in the UserData field. The Notification is filtered first on its type, then on its DeploymentInfo.shortName. Uses copy-on-write semantics for fast unsynchronized access.

See Also:
Serialized Form

Constructor Summary
DeploymentInfoNotificationFilterFactory.DeploymentInfoNotificationFilter()
          Default CTOR.
 
Method Summary
 void disableAllShortNames()
          Disable all shortNames.
 void disableShortName(String name)
          Disable a shortName.
 void enableShortName(String name)
          Enable a shortName.
 Vector getEnabledShortNames()
          Get all the enabled short names.
 boolean isNotificationEnabled(javax.management.Notification notification)
          Test to see whether this notification is enabled
 String toString()
           
 
Methods inherited from class org.jboss.mx.util.JBossNotificationFilterSupport
disableAllTypes, disableType, enableType, getEnabledTypes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeploymentInfoNotificationFilterFactory.DeploymentInfoNotificationFilter

public DeploymentInfoNotificationFilterFactory.DeploymentInfoNotificationFilter()
Default CTOR. Create a filter that filters out all notification types/sortnames.

Method Detail

disableAllShortNames

public void disableAllShortNames()
Disable all shortNames. Rejects all notifications.


disableShortName

public void disableShortName(String name)
Disable a shortName.

Parameters:
name - the shortName to disable.

enableShortName

public void enableShortName(String name)
                     throws IllegalArgumentException
Enable a shortName.

Parameters:
name - the shortName to enable.
Throws:
IllegalArgumentException - for a null name.

getEnabledShortNames

public Vector getEnabledShortNames()
Get all the enabled short names.

Returns a vector of enabled short names.
An empty vector means all short names disabled.

Returns:
the vector of enabled short names.

toString

public String toString()
Overrides:
toString in class org.jboss.mx.util.JBossNotificationFilterSupport
Returns:
human readable string.

isNotificationEnabled

public boolean isNotificationEnabled(javax.management.Notification notification)
Test to see whether this notification is enabled

Specified by:
isNotificationEnabled in interface javax.management.NotificationFilter
Overrides:
isNotificationEnabled in class org.jboss.mx.util.JBossNotificationFilterSupport
Parameters:
notification - the notification to filter
Returns:
true when the notification should be sent, false otherwise
Throws:
IllegalArgumentException - for null notification.


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.