Package org.osgi.service.application
Class ApplicationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.osgi.service.application.ApplicationException
- All Implemented Interfaces:
- Serializable
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:
 -  APPLICATION_LOCKED- The application couldn't be launched because it is locked.
-  APPLICATION_NOT_LAUNCHABLE- The application is not in launchable state.
-  APPLICATION_INTERNAL_ERROR- An exception was thrown by the application or its container during launch.
-  APPLICATION_SCHEDULING_FAILED- The scheduling of an application failed.
-  APPLICATION_DUPLICATE_SCHEDULE_ID- The application scheduling failed because the specified identifier is already in use.
-  APPLICATION_EXITVALUE_NOT_AVAILABLE- The exit value is not available for an application instance because the instance has not terminated.
-  APPLICATION_INVALID_STARTUP_ARGUMENT- One of the specified startup arguments is invalid, for example its type is not permitted.
- Version:
- $Id: 08d42ec7b09ff4543192b32d7a83a8afd34fd9f5 $
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intThe application scheduling failed because the specified identifier is already in use.static final intThe exit value is not available for an application instance because the instance has not terminated.static final intAn exception was thrown by the application or the corresponding container during launch.static final intOne of the specified startup arguments is invalid, for example its type is not permitted.static final intThe application couldn't be launched because it is locked.static final intThe application is not in launchable state, it'sApplicationDescriptor.APPLICATION_LAUNCHABLEattribute is false.static final intThe application schedule could not be created due to some internal error (for example, the schedule information couldn't be saved due to some storage error).
- 
Constructor SummaryConstructorsConstructorDescriptionApplicationException(int errorCode) Creates anApplicationExceptionwith the specified error code.ApplicationException(int errorCode, String message) Creates anApplicationExceptionwith the specified error code.ApplicationException(int errorCode, String message, Throwable cause) Creates aApplicationExceptionthat wraps another exception.ApplicationException(int errorCode, Throwable cause) Creates aApplicationExceptionthat wraps another exception.
- 
Method SummaryModifier and TypeMethodDescriptiongetCause()Returns the cause of this exception ornullif no cause was set.intReturns the error code associated with this exception.Methods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Field Details- 
APPLICATION_LOCKEDpublic static final int APPLICATION_LOCKEDThe application couldn't be launched because it is locked.- See Also:
 
- 
APPLICATION_NOT_LAUNCHABLEpublic static final int APPLICATION_NOT_LAUNCHABLEThe application is not in launchable state, it'sApplicationDescriptor.APPLICATION_LAUNCHABLEattribute is false.- See Also:
 
- 
APPLICATION_INTERNAL_ERRORpublic static final int APPLICATION_INTERNAL_ERRORAn exception was thrown by the application or the corresponding container during launch. The exception is available fromgetCause().- See Also:
 
- 
APPLICATION_SCHEDULING_FAILEDpublic static final int APPLICATION_SCHEDULING_FAILEDThe application schedule could not be created due to some internal error (for example, the schedule information couldn't be saved due to some storage error).- See Also:
 
- 
APPLICATION_DUPLICATE_SCHEDULE_IDpublic static final int APPLICATION_DUPLICATE_SCHEDULE_IDThe application scheduling failed because the specified identifier is already in use.- See Also:
 
- 
APPLICATION_EXITVALUE_NOT_AVAILABLEpublic static final int APPLICATION_EXITVALUE_NOT_AVAILABLEThe exit value is not available for an application instance because the instance has not terminated.- Since:
- 1.1
- See Also:
 
- 
APPLICATION_INVALID_STARTUP_ARGUMENTpublic static final int APPLICATION_INVALID_STARTUP_ARGUMENTOne of the specified startup arguments is invalid, for example its type is not permitted.- Since:
- 1.1
- See Also:
 
 
- 
- 
Constructor Details- 
ApplicationExceptionpublic ApplicationException(int errorCode) Creates anApplicationExceptionwith the specified error code.- Parameters:
- errorCode- The code of the error
 
- 
ApplicationExceptionCreates aApplicationExceptionthat wraps another exception.- Parameters:
- errorCode- The code of the error
- cause- The cause of this exception.
 
- 
ApplicationExceptionCreates anApplicationExceptionwith the specified error code.- Parameters:
- errorCode- The code of the error
- message- The associated message
 
- 
ApplicationExceptionCreates aApplicationExceptionthat wraps another exception.- Parameters:
- errorCode- The code of the error
- message- The associated message.
- cause- The cause of this exception.
 
 
- 
- 
Method Details- 
getCauseReturns the cause of this exception ornullif no cause was set.
- 
getErrorCodepublic int getErrorCode()Returns the error code associated with this exception.- Returns:
- The error code of this exception.
 
 
-