Coverage Report - org.mule.impl.internal.notifications.ManagementNotification
 
Classes in this File Line Coverage Branch Coverage Complexity
ManagementNotification
14%
1/7
0%
0/2
2
 
 1  
 /*
 2  
  * $Id: ManagementNotification.java 7963 2007-08-21 08:53:15Z dirk.olmes $
 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 CPAL v1.0
 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  
  */
 22  
 public class ManagementNotification extends UMOServerNotification
 23  
 {
 24  
     /**
 25  
      * Serial version
 26  
      */
 27  
     private static final long serialVersionUID = -259130553709035786L;
 28  
 
 29  
     // TODO resource status notifications here i.e.
 30  
     public static final int MANAGEMENT_COMPONENT_QUEUE_EXHAUSTED = MANAGEMENT_EVENT_ACTION_START_RANGE + 1;
 31  
     public static final int MANAGEMENT_NODE_PING = MANAGEMENT_EVENT_ACTION_START_RANGE + 2;
 32  
 
 33  2
     private static final transient String[] ACTIONS = new String[]{};
 34  
 
 35  
     public ManagementNotification(Object message, int action)
 36  
     {
 37  0
         super(message, action);
 38  0
     }
 39  
 
 40  
     protected String getActionName(int action)
 41  
     {
 42  0
         int i = action - MANAGEMENT_EVENT_ACTION_START_RANGE;
 43  0
         if (i - 1 > ACTIONS.length)
 44  
         {
 45  0
             return String.valueOf(action);
 46  
         }
 47  0
         return ACTIONS[i - 1];
 48  
     }
 49  
 }