org.talend.esb.sam.common.event
Class MonitoringException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.talend.esb.sam.common.event.MonitoringException
All Implemented Interfaces:
Serializable

public class MonitoringException
extends RuntimeException

The Class MonitoringException describes the monitoring exception.

See Also:
Serialized Form

Constructor Summary
MonitoringException(String code, String message, Throwable t)
          Instantiates a new monitoring exception.
MonitoringException(String code, String message, Throwable t, Event event)
          Instantiates a new monitoring exception.
MonitoringException(String code, String message, Throwable t, List<Event> events)
          Instantiates a new monitoring exception.
 
Method Summary
 void addEvent(Event event)
          Adds the event.
 void addEvents(Collection<Event> eventCollection)
          Adds the events.
 String getCode()
          Gets the code.
 String getMessage()
           
 void logException(Level level)
          Prints the error message as log message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MonitoringException

public MonitoringException(String code,
                           String message,
                           Throwable t)
Instantiates a new monitoring exception.

Parameters:
code - the code
message - the message
t - the Trowable type for exeption definition

MonitoringException

public MonitoringException(String code,
                           String message,
                           Throwable t,
                           Event event)
Instantiates a new monitoring exception.

Parameters:
code - the monitoring exception code
message - the message
t - Trowable type for exeption definition
event - the event

MonitoringException

public MonitoringException(String code,
                           String message,
                           Throwable t,
                           List<Event> events)
Instantiates a new monitoring exception.

Parameters:
code - the monitoring exception code
message - the message
t - Trowable type for exeption definition
events - the events
Method Detail

getCode

public String getCode()
Gets the code.

Returns:
the code

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable

logException

public void logException(Level level)
Prints the error message as log message.

Parameters:
level - the log level

addEvent

public void addEvent(Event event)
Adds the event.

Parameters:
event - the event

addEvents

public void addEvents(Collection<Event> eventCollection)
Adds the events.

Parameters:
eventCollection - the event collection


Copyright © 2011–2014 Talend Inc.. All rights reserved.