KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > impl > internal > notifications > ManagementNotification


1 /*
2  * $Id: ManagementNotification.java 3798 2006-11-04 04:07:14Z aperepel $
3  * --------------------------------------------------------------------------------------
4  * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
5  *
6  * The software in this package is published under the terms of the MuleSource MPL
7  * license, a copy of which has been included with this distribution in the
8  * LICENSE.txt file.
9  */

10
11 package org.mule.impl.internal.notifications;
12
13 import org.mule.umo.manager.UMOServerNotification;
14
15 /**
16  * <code>ManagementNotification</code> is fired when monitored resources such as
17  * internal queues reach capacity
18  *
19  * @see org.mule.MuleManager
20  * @see org.mule.umo.manager.UMOManager
21  * @author <a HREF="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
22  * @version $Revision: 3798 $
23  */

24 public class ManagementNotification extends UMOServerNotification
25 {
26     /**
27      * Serial version
28      */

29     private static final long serialVersionUID = -259130553709035786L;
30
31     // TODO resource status notifications here i.e.
32
public static final int MANAGEMENT_COMPONENT_QUEUE_EXHAUSTED = MANAGEMENT_EVENT_ACTION_START_RANGE + 1;
33     public static final int MANAGEMENT_NODE_PING = MANAGEMENT_EVENT_ACTION_START_RANGE + 2;
34
35     private static final transient String JavaDoc[] ACTIONS = new String JavaDoc[]{};
36
37     public ManagementNotification(Object JavaDoc message, int action)
38     {
39         super(message, action);
40     }
41
42     protected String JavaDoc getActionName(int action)
43     {
44         int i = action - MANAGEMENT_EVENT_ACTION_START_RANGE;
45         if (i - 1 > ACTIONS.length)
46         {
47             return String.valueOf(action);
48         }
49         return ACTIONS[i - 1];
50     }
51 }
52
Popular Tags