Java EE 5 SDK

com.sun.appserv.management.base
Class OperationStatusBase

java.lang.Object
  extended by com.sun.appserv.management.base.MapCapableBase
      extended by com.sun.appserv.management.base.OperationStatusBase
All Implemented Interfaces:
MapCapable, OperationStatus
Direct Known Subclasses:
DeploymentStatusImpl

public class OperationStatusBase
extends MapCapableBase
implements OperationStatus

Base class for OperationStatus.


Field Summary
 
Fields inherited from interface com.sun.appserv.management.base.OperationStatus
STATUS_CODE_FAILURE, STATUS_CODE_KEY, STATUS_CODE_SUCCESS, STATUS_CODE_WARNING, THROWABLE_KEY
 
Fields inherited from interface com.sun.appserv.management.base.MapCapable
MAP_CAPABLE_CLASS_NAME_KEY
 
Constructor Summary
OperationStatusBase(Map<String,T> m, String className)
          Create a new instance which represents the appropriate class.
 
Method Summary
 int getStatusCode()
          If there is no explicit status code, an operation is considered successful if nothing was thrown.
 Throwable getThrowable()
          If a Throwable was thrown, this implies some degree of failure from partial to total.
 void setStatusCode(int statusCode)
          set the status code for the operation
 void setThrowable(Throwable t)
          Set the Throwable for the operation, which may be null.
protected  boolean validate()
          Return true if internal state is valid, false otherwise.
 
Methods inherited from class com.sun.appserv.management.base.MapCapableBase
asMap, asMapHook, checkInJavaUtil, checkLegalObject, checkLegalObject, checkValidType, equals, getboolean, getBoolean, getByte, getField, getFile, getInteger, getMap, getMapClassName, getObject, getString, getStringArray, hashCode, illegalObject, makeImmutable, putAll, putField, putFieldHook, toString, validateNullOrOfType, validateThrow
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.appserv.management.base.MapCapable
asMap, getMapClassName
 

Constructor Detail

OperationStatusBase

public OperationStatusBase(Map<String,T> m,
                           String className)
Create a new instance which represents the appropriate class.

Parameters:
m - a Map representing the appropriate class
className - the class which the Map represents
Method Detail

validate

protected boolean validate()
Description copied from class: MapCapableBase
Return true if internal state is valid, false otherwise.

Specified by:
validate in class MapCapableBase

getStatusCode

public int getStatusCode()
Description copied from interface: OperationStatus
If there is no explicit status code, an operation is considered successful if nothing was thrown.

Legal status codes include:

Specified by:
getStatusCode in interface OperationStatus
Returns:
the status code from the operation

setStatusCode

public void setStatusCode(int statusCode)
set the status code for the operation


getThrowable

public Throwable getThrowable()
Description copied from interface: OperationStatus
If a Throwable was thrown, this implies some degree of failure from partial to total.

Specified by:
getThrowable in interface OperationStatus
Returns:
a Throwable for the operation, or null if none

setThrowable

public void setThrowable(Throwable t)
Set the Throwable for the operation, which may be null.


Java EE 5 SDK

Submit a bug or feature

Copyright 2006 Sun Microsystems, Inc. All rights reserved.