OSGi™ Service Platform
Release 4 Version 4.1

org.osgi.service.application
Class ApplicationException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.osgi.service.application.ApplicationException
All Implemented Interfaces:
java.io.Serializable

public class ApplicationException
extends java.lang.Exception

This exception is used to indicate problems related to application lifecycle management. ApplicationException object is created by the Application Admin to denote an exception condition in the lifecycle of an application. ApplicationExceptions should not be created by developers.
ApplicationExceptions are associated with an error code. This code describes the type of problem reported in this exception. The possible codes are:

See Also:
Serialized Form

Field Summary
static int APPLICATION_DUPLICATE_SCHEDULE_ID
          The application scheduling failed because the specified identifier is already in use.
static int APPLICATION_INTERNAL_ERROR
          An exception was thrown by the application or the corresponding container during launch.
static int APPLICATION_LOCKED
          The application couldn't be launched because it is locked.
static int APPLICATION_NOT_LAUNCHABLE
          The application is not in launchable state, it's ApplicationDescriptor.APPLICATION_LAUNCHABLE attribute is false.
static int APPLICATION_SCHEDULING_FAILED
          The application schedule could not be created due to some internal error (for example, the schedule information couldn't be saved).
 
Constructor Summary
ApplicationException(int errorCode)
          Creates an ApplicationException with the specified error code.
ApplicationException(int errorCode, java.lang.String message)
          Creates an ApplicationException with the specified error code.
ApplicationException(int errorCode, java.lang.String message, java.lang.Throwable cause)
          Creates a ApplicationException that wraps another exception.
ApplicationException(int errorCode, java.lang.Throwable cause)
          Creates a ApplicationException that wraps another exception.
 
Method Summary
 java.lang.Throwable getCause()
          Returns the cause of this exception or null if no cause was specified when this exception was created.
 int getErrorCode()
          Returns the error code associcated with this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

APPLICATION_LOCKED

public static final int APPLICATION_LOCKED
The application couldn't be launched because it is locked.

See Also:
Constant Field Values

APPLICATION_NOT_LAUNCHABLE

public static final int APPLICATION_NOT_LAUNCHABLE
The application is not in launchable state, it's ApplicationDescriptor.APPLICATION_LAUNCHABLE attribute is false.

See Also:
Constant Field Values

APPLICATION_INTERNAL_ERROR

public static final int APPLICATION_INTERNAL_ERROR
An exception was thrown by the application or the corresponding container during launch. The exception is available in getCause().

See Also:
Constant Field Values

APPLICATION_SCHEDULING_FAILED

public static final int APPLICATION_SCHEDULING_FAILED
The application schedule could not be created due to some internal error (for example, the schedule information couldn't be saved).

See Also:
Constant Field Values

APPLICATION_DUPLICATE_SCHEDULE_ID

public static final int APPLICATION_DUPLICATE_SCHEDULE_ID
The application scheduling failed because the specified identifier is already in use.

See Also:
Constant Field Values
Constructor Detail

ApplicationException

public ApplicationException(int errorCode)
Creates an ApplicationException with the specified error code.

Parameters:
errorCode - The code of the error

ApplicationException

public ApplicationException(int errorCode,
                            java.lang.Throwable cause)
Creates a ApplicationException that wraps another exception.

Parameters:
errorCode - The code of the error
cause - The cause of this exception.

ApplicationException

public ApplicationException(int errorCode,
                            java.lang.String message)
Creates an ApplicationException with the specified error code.

Parameters:
errorCode - The code of the error
message - The associated message

ApplicationException

public ApplicationException(int errorCode,
                            java.lang.String message,
                            java.lang.Throwable cause)
Creates a ApplicationException that wraps another exception.

Parameters:
errorCode - The code of the error
message - The associated message.
cause - The cause of this exception.
Method Detail

getCause

public java.lang.Throwable getCause()
Returns the cause of this exception or null if no cause was specified when this exception was created.

Returns:
The cause of this exception or null if no cause was specified.

getErrorCode

public int getErrorCode()
Returns the error code associcated with this exception.

Returns:
The error code of this exception.

OSGi™ Service Platform
Release 4 Version 4.1

Copyright © OSGi Alliance (2000, 2007). All Rights Reserved. Licensed under the OSGi Specification License, Version 1.0