Coverage Report - org.mule.impl.internal.notifications.ExceptionNotification
 
Classes in this File Line Coverage Branch Coverage Complexity
ExceptionNotification
0%
0/10
0%
0/1
1.5
 
 1  
 /*
 2  
  * $Id: ExceptionNotification.java 7976 2007-08-21 14:26:13Z 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  
 public class ExceptionNotification extends UMOServerNotification
 16  
 {
 17  
     /**
 18  
      * Serial version
 19  
      */
 20  
     private static final long serialVersionUID = -43091546451476239L;
 21  
     public static final int EXCEPTION_ACTION = EXCEPTION_EVENT_ACTION_START_RANGE + 1;
 22  
 
 23  0
     private static final transient String[] ACTIONS = new String[] {"exception"};
 24  
 
 25  
     private Throwable exception;
 26  
 
 27  
     public ExceptionNotification(Throwable exception)
 28  
     {
 29  0
         super(exception, EXCEPTION_ACTION);
 30  0
         this.exception = exception;
 31  0
     }
 32  
 
 33  
     public Throwable getException()
 34  
     {
 35  0
         return this.exception;
 36  
     }
 37  
 
 38  
     protected String getActionName(int action)
 39  
     {
 40  0
         int i = action - EXCEPTION_EVENT_ACTION_START_RANGE;
 41  0
         if (i - 1 > ACTIONS.length)
 42  
         {
 43  0
             return String.valueOf(action);
 44  
         }
 45  0
         return ACTIONS[i - 1];
 46  
     }
 47  
 
 48  
     public String getType()
 49  
     {
 50  0
         return TYPE_ERROR;
 51  
     }
 52  
 }