SmartFrog 3.10.000

org.smartfrog.sfcore.prim
Class TerminationRecord

java.lang.Object
  extended by org.smartfrog.sfcore.prim.TerminationRecord
All Implemented Interfaces:
java.io.Serializable

public class TerminationRecord
extends java.lang.Object
implements java.io.Serializable

Represents a termination status for components. Components use this record to indicate how they have failed. This record is passed to other components in the containment tree on termination.

See Also:
Serialized Form

Field Summary
static java.lang.String ABNORMAL
          String name for errortype abnormal.
 java.lang.Throwable cause
          exception causing a failure.
 java.lang.String description
          Description.
 java.lang.String errorType
          Errortype.
static java.lang.String EXTERNAL_REFERENCE_DEAD
          String name for errortype externalReferenceDead.
 Reference id
          id of failing component.
static java.lang.String NORMAL
          String name for errortype normal.
 
Constructor Summary
TerminationRecord(java.lang.String errType, java.lang.String descr, Reference id)
          Constructs a new termination record.
TerminationRecord(java.lang.String errType, java.lang.String descr, Reference id, java.lang.Throwable cause)
          Constructs a new termination record.
 
Method Summary
static TerminationRecord abnormal(java.lang.String descr, Reference id)
          Utility method.
static TerminationRecord abnormal(java.lang.String descr, Reference id, java.lang.Throwable cause)
          Utility method.
static TerminationRecord externalReferenceDead(Reference id)
          Utility method.
static TerminationRecord normal(Reference id)
          Utility method.
 java.lang.String toString()
          Returns string representation of termination record.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NORMAL

public static final java.lang.String NORMAL
String name for errortype normal.

See Also:
Constant Field Values

ABNORMAL

public static final java.lang.String ABNORMAL
String name for errortype abnormal.

See Also:
Constant Field Values

EXTERNAL_REFERENCE_DEAD

public static final java.lang.String EXTERNAL_REFERENCE_DEAD
String name for errortype externalReferenceDead.

See Also:
Constant Field Values

errorType

public java.lang.String errorType
Errortype.


description

public java.lang.String description
Description.


id

public Reference id
id of failing component.


cause

public java.lang.Throwable cause
exception causing a failure.

Constructor Detail

TerminationRecord

public TerminationRecord(java.lang.String errType,
                         java.lang.String descr,
                         Reference id)
Constructs a new termination record.

Parameters:
errType - error type, system recognized types are "normal", "abnormal" and "externalReferenceDead".
descr - description of termination
id - id of failing component

TerminationRecord

public TerminationRecord(java.lang.String errType,
                         java.lang.String descr,
                         Reference id,
                         java.lang.Throwable cause)
Constructs a new termination record.

Parameters:
errType - error type, system recognized types are "normal", "abnormal" and "externalReferenceDead".
descr - description of termination
id - id of failing component
cause - the exception that caused the abnormal termination
Method Detail

normal

public static TerminationRecord normal(Reference id)
Utility method. Returns a normal termination record.

Parameters:
id - id of component
Returns:
a SFTerminationRecord

abnormal

public static TerminationRecord abnormal(java.lang.String descr,
                                         Reference id)
Utility method. Returns an abnormal termination record.

Parameters:
descr - description of abnormal failure
id - id of component
Returns:
a SFTerminationRecord

abnormal

public static TerminationRecord abnormal(java.lang.String descr,
                                         Reference id,
                                         java.lang.Throwable cause)
Utility method. Returns an abnormal termination record.

Parameters:
descr - description of abnormal failure
id - id of component
cause - the exception that caused the abnormal termination
Returns:
a SFTerminationRecord

externalReferenceDead

public static TerminationRecord externalReferenceDead(Reference id)
Utility method. Returns an external failure termination record.

Parameters:
id - id of component
Returns:
a SFTerminationRecord

toString

public java.lang.String toString()
Returns string representation of termination record.

Overrides:
toString in class java.lang.Object
Returns:
string representation of termination record

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP