cz.cuni.amis.pogamut.base.component.bus.event.impl
Class FatalErrorEvent<SOURCE extends IComponent>

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.component.bus.event.impl.FatalErrorEvent<SOURCE>
All Implemented Interfaces:
IFatalErrorEvent<SOURCE>, IComponentEvent<SOURCE>
Direct Known Subclasses:
ComponentBusErrorEvent, FatalErrorPropagatingEvent

public class FatalErrorEvent<SOURCE extends IComponent>
extends java.lang.Object
implements IFatalErrorEvent<SOURCE>


Field Summary
protected  java.lang.Throwable cause
           
protected  SOURCE component
           
protected  java.lang.String message
           
protected  java.lang.Object origin
           
protected  java.lang.StackTraceElement[] stackTrace
           
 
Constructor Summary
FatalErrorEvent(SOURCE component, java.lang.String message)
           
FatalErrorEvent(SOURCE component, java.lang.String message, java.lang.Throwable cause)
           
FatalErrorEvent(SOURCE component, java.lang.Throwable cause)
           
 
Method Summary
 java.lang.Throwable getCause()
          Exception associated with the error, may be null.
 java.lang.String getMessage()
          Returns description of what went wrong.
 SOURCE getSource()
           
 java.lang.StackTraceElement[] getStackTrace()
          Stack trace of the error - first element of the stacktrace should be the place where the fatal error event has been created.
 java.lang.String getSummary()
          Called to get a long human-readable description of the fatal error.
protected  java.lang.String printStackStrace(java.lang.StackTraceElement[] stackTraceToPrint, java.lang.String indent)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

origin

protected java.lang.Object origin

component

protected SOURCE extends IComponent component

message

protected java.lang.String message

cause

protected java.lang.Throwable cause

stackTrace

protected java.lang.StackTraceElement[] stackTrace
Constructor Detail

FatalErrorEvent

public FatalErrorEvent(SOURCE component,
                       java.lang.String message)

FatalErrorEvent

public FatalErrorEvent(SOURCE component,
                       java.lang.String message,
                       java.lang.Throwable cause)

FatalErrorEvent

public FatalErrorEvent(SOURCE component,
                       java.lang.Throwable cause)
Method Detail

getSource

public SOURCE getSource()
Specified by:
getSource in interface IComponentEvent<SOURCE extends IComponent>

getCause

public java.lang.Throwable getCause()
Description copied from interface: IFatalErrorEvent
Exception associated with the error, may be null.

Specified by:
getCause in interface IFatalErrorEvent<SOURCE extends IComponent>
Returns:

getMessage

public java.lang.String getMessage()
Description copied from interface: IFatalErrorEvent
Returns description of what went wrong.

Specified by:
getMessage in interface IFatalErrorEvent<SOURCE extends IComponent>
Returns:

getStackTrace

public java.lang.StackTraceElement[] getStackTrace()
Description copied from interface: IFatalErrorEvent
Stack trace of the error - first element of the stacktrace should be the place where the fatal error event has been created.

Specified by:
getStackTrace in interface IFatalErrorEvent<SOURCE extends IComponent>
Returns:

printStackStrace

protected java.lang.String printStackStrace(java.lang.StackTraceElement[] stackTraceToPrint,
                                            java.lang.String indent)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getSummary

public java.lang.String getSummary()
Description copied from interface: IFatalErrorEvent
Called to get a long human-readable description of the fatal error.

Specified by:
getSummary in interface IFatalErrorEvent<SOURCE extends IComponent>