View Javadoc

1   /*
2    * $Id: ExceptionNotification.java 10489 2008-01-23 17:53:38Z dfeist $
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.context.notification;
12  
13  import org.mule.api.context.notification.ServerNotification;
14  
15  public class ExceptionNotification extends ServerNotification
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      static
24      {
25          registerAction("exception", EXCEPTION_ACTION);
26      }
27  
28      private Throwable exception;
29  
30      public ExceptionNotification(Throwable exception)
31      {
32          super(exception, EXCEPTION_ACTION);
33          this.exception = exception;
34      }
35  
36      public Throwable getException()
37      {
38          return this.exception;
39      }
40  
41      public String getType()
42      {
43          return TYPE_ERROR;
44      }
45  }