com.novell.nds.dirxml.driver.soap.util
Class StatusException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.novell.nds.dirxml.driver.soap.util.StatusException
All Implemented Interfaces:
java.io.Serializable

public class StatusException
extends java.lang.Exception

Thrown by SOAP driver extensions to indicate an error has occurred in the extension. When StatusException is caught by the driver, it generates a status document that gets sent to the DirXML engine and logged to the DSTrace utility and the DirXML logging facility.

If you want to simply print a message to the DSTrace utility, you can use the Tracer object that is passed to the extension's init() method rather than throwing an exception.

See Also:
Serialized Form

Field Summary
static int LEVEL_ERROR
          A non-fatal error occurred in the Extension.
static int LEVEL_FATAL
          A fatal error occurred and the driver should shut down.
static int LEVEL_RETRY
          A temporary error occurred and the driver should retry the event later.
static int LEVEL_WARNING
          A non-fatal condition occurred in the Extension.
static int TYPE_APP_AUTHENTICATION
          Related to an application authentication request.
static int TYPE_APP_CONNECTION
          A change occurred in the availability of an application.
static int TYPE_APP_GENERAL
          A general response from an application API.
static int TYPE_DRIVER_GENERAL
          A response generated by a driver.
static int TYPE_PASSWORD_SET_OPERATION
          A response to an application password set or change event.
 
Constructor Summary
StatusException(int level, int type, java.lang.String code, java.lang.String message)
          Creates a StatusException object that is used to indicate to the driver that an error occurred in the extension.
 
Method Summary
 java.lang.String getCode()
          Returns the code value that was passed into the constructor.
 int getLevel()
          Returns the level value that was passed into the constructor.
 int getType()
          Returns the type value that was passed into the constructor.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LEVEL_WARNING

public static final int LEVEL_WARNING
A non-fatal condition occurred in the Extension. The resulting status document causes a yellow message to be written to the DSTrace utility.

See Also:
Constant Field Values

LEVEL_ERROR

public static final int LEVEL_ERROR
A non-fatal error occurred in the Extension. The resulting status document causes a red message to be written to the DSTrace utility. When a regular Exception object is thrown from an extension, it also results in a status document being created with this statusLevel.

See Also:
Constant Field Values

LEVEL_FATAL

public static final int LEVEL_FATAL
A fatal error occurred and the driver should shut down. The resulting status document causes a red message to be written to the DSTrace utility and causes the driver to shut down. Any StatusException or Exception that is thrown from the init() method of an Extension automatically gets promoted to a StatusException with a statusLevel set to LEVEL_FATAL.

See Also:
Constant Field Values

LEVEL_RETRY

public static final int LEVEL_RETRY
A temporary error occurred and the driver should retry the event later. The resulting status document causes a red message to be written to the DSTrace utility and causes the driver to shut down. The LEVEL_RETRY status must be set on exceptions thrown on the subscriber channel only.

See Also:
Constant Field Values

TYPE_APP_GENERAL

public static final int TYPE_APP_GENERAL
A general response from an application API.

See Also:
Constant Field Values

TYPE_APP_AUTHENTICATION

public static final int TYPE_APP_AUTHENTICATION
Related to an application authentication request.

See Also:
Constant Field Values

TYPE_APP_CONNECTION

public static final int TYPE_APP_CONNECTION
A change occurred in the availability of an application.

See Also:
Constant Field Values

TYPE_DRIVER_GENERAL

public static final int TYPE_DRIVER_GENERAL
A response generated by a driver.

See Also:
Constant Field Values

TYPE_PASSWORD_SET_OPERATION

public static final int TYPE_PASSWORD_SET_OPERATION
A response to an application password set or change event.

See Also:
Constant Field Values
Constructor Detail

StatusException

public StatusException(int level,
                       int type,
                       java.lang.String code,
                       java.lang.String message)
Creates a StatusException object that is used to indicate to the driver that an error occurred in the extension.

Parameters:
level - Set to either LEVEL_WARNING, LEVEL_ERROR, LEVEL_FATAL, or LEVEL_RETRY.
type - An indication of the type of error that occurred. Must be set to either TYPE_APP_GENERAL, TYPE_APP_AUTHENTICATION, TYPE_APP_CONNECTION, TYPE_DRIVER_GENERAL, or TYPE_PASSWORD_SET_OPERATION.
code - The error code returned from the application, if applicable. This is usually a number but can be any string. If the error didn't originate in the application or if the application doesn't use error codes, set it to null.
message - A descriptive message describing the error that occurred.
Method Detail

getLevel

public int getLevel()
Returns the level value that was passed into the constructor.

Returns:
level either STATUS_WARNING, STATUS_ERROR, or LEVEL_FATAL, or LEVEL_RETRY

getType

public int getType()
Returns the type value that was passed into the constructor.

Returns:
type

getCode

public java.lang.String getCode()
Returns the code value that was passed into the constructor.

Returns:
The code if it was set, or null.