< prev index next >

application/tests/org.openjdk.jmc.rjmx.test/src/test/java/org/openjdk/jmc/rjmx/test/triggers/NotificationActionCallback.java

Print this page




  29  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  30  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
  31  * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32  */
  33 package org.openjdk.jmc.rjmx.test.triggers;
  34 
  35 import org.w3c.dom.Element;
  36 
  37 import org.openjdk.jmc.rjmx.IConnectionHandle;
  38 import org.openjdk.jmc.rjmx.triggers.ITriggerAction;
  39 import org.openjdk.jmc.rjmx.triggers.TriggerEvent;
  40 
  41 /**
  42  * Simple action that just calls the NotificationActionCallbackReceiver with the event. This class
  43  * primarily exists to facilitate unit testing of the notification framework.
  44  */
  45 public class NotificationActionCallback implements ITriggerAction {
  46         /**
  47          * Action name.
  48          */
  49         public static final String NAME = "Callback action"; //$NON-NLS-1$
  50 
  51         /**
  52          * Description. Won't be used for this class.
  53          */
  54         public static final String DESCRIPTION = "Blablablablablablabla"; //$NON-NLS-1$
  55 
  56         private final NotificationActionCallbackReceiver m_receiver;
  57 
  58         /**
  59          * Notification event callback interface.
  60          */
  61         public interface NotificationActionCallbackReceiver {
  62                 /**
  63                  * The callback method.
  64                  *
  65                  * @param e
  66                  *            the event.
  67                  */
  68                 void onNotificationAction(TriggerEvent e);
  69         }
  70 
  71         /**
  72          * Constructor.
  73          *
  74          * @param receiver




  29  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  30  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
  31  * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32  */
  33 package org.openjdk.jmc.rjmx.test.triggers;
  34 
  35 import org.w3c.dom.Element;
  36 
  37 import org.openjdk.jmc.rjmx.IConnectionHandle;
  38 import org.openjdk.jmc.rjmx.triggers.ITriggerAction;
  39 import org.openjdk.jmc.rjmx.triggers.TriggerEvent;
  40 
  41 /**
  42  * Simple action that just calls the NotificationActionCallbackReceiver with the event. This class
  43  * primarily exists to facilitate unit testing of the notification framework.
  44  */
  45 public class NotificationActionCallback implements ITriggerAction {
  46         /**
  47          * Action name.
  48          */
  49         public static final String NAME = "Callback action";
  50 
  51         /**
  52          * Description. Won't be used for this class.
  53          */
  54         public static final String DESCRIPTION = "Blablablablablablabla";
  55 
  56         private final NotificationActionCallbackReceiver m_receiver;
  57 
  58         /**
  59          * Notification event callback interface.
  60          */
  61         public interface NotificationActionCallbackReceiver {
  62                 /**
  63                  * The callback method.
  64                  *
  65                  * @param e
  66                  *            the event.
  67                  */
  68                 void onNotificationAction(TriggerEvent e);
  69         }
  70 
  71         /**
  72          * Constructor.
  73          *
  74          * @param receiver


< prev index next >