com.jpeterson.x10
Class GatewayErrorEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.jpeterson.x10.ControlEvent
              |
              +--com.jpeterson.x10.GatewayEvent
                    |
                    +--com.jpeterson.x10.GatewayErrorEvent

public class GatewayErrorEvent
extends GatewayEvent

GatewayErrorEvent is an asynchronous notification of an internal error in the gateway which prevents normal behavior of that gateway. The event encapsulates a Throwable object that provides details about the rror.

See Also:
gatewayError, SerializedForm, Serialized Form

Field Summary
static int GATEWAY_ERROR
          Identifier for event issued when gateway error occurs.
protected  java.lang.Throwable problem
          Throwable object (Exception or Error) that describes the detected gateway problem.
 
Fields inherited from class com.jpeterson.x10.GatewayEvent
GATEWAY_ALLOCATED, GATEWAY_ALLOCATING_RESOURCES, GATEWAY_DEALLOCATED, GATEWAY_DEALLOCATING_RESOURCES, GATEWAY_PAUSED, GATEWAY_RESUMED, newGatewayState, oldGatewayState
 
Fields inherited from class com.jpeterson.x10.ControlEvent
id
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GatewayErrorEvent(Gateway source, int id, java.lang.Throwable throwable, long oldGatewayState, long newGatewayState)
          Constructs a GatewayErrorEvent with an event identifier, throwable, old gateway state and new gateway state.
 
Method Summary
 java.lang.Throwable getGatewayError()
          Return the Throwable object (Exception or Error) that describes the gateway problem.
 java.lang.String paramString()
          Returns a parameter string identifying this event.
 
Methods inherited from class com.jpeterson.x10.GatewayEvent
getNewGatewayState, getOldGatewayState
 
Methods inherited from class com.jpeterson.x10.ControlEvent
getId, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GATEWAY_ERROR

public static final int GATEWAY_ERROR
Identifier for event issued when gateway error occurs.
See Also:
gatewayError

problem

protected java.lang.Throwable problem
Throwable object (Exception or Error) that describes the detected gateway problem.
See Also:
getGatewayError
Constructor Detail

GatewayErrorEvent

public GatewayErrorEvent(Gateway source,
                         int id,
                         java.lang.Throwable throwable,
                         long oldGatewayState,
                         long newGatewayState)
Constructs a GatewayErrorEvent with an event identifier, throwable, old gateway state and new gateway state. The old and new states are zero if the gateway states are unknown or undefined.
Parameters:
source - the object that issued the event
id - the identifier for the event type
throwable - description of the detected error
oldGatewayState - gateway state prior to this event
newGatewayState - gateway state following this event
See Also:
getEngineState
Method Detail

getGatewayError

public java.lang.Throwable getGatewayError()
Return the Throwable object (Exception or Error) that describes the gateway problem.

paramString

public java.lang.String paramString()
Returns a parameter string identifying this event. This method is useful for event-logging and for debugging.
Overrides:
paramString in class GatewayEvent
Returns:
a string identifying the event