A ServiceException object is created by the Framework or service
implementation to denote an exception condition in the service. A type code
is used to identify the exception type for future extendability. Service
implementations may also create subclasses of ServiceException. When
subclassing, the subclass should set the type to SUBCLASSED to
indicate that ServiceException has been subclassed.
This exception conforms to the general purpose exception chaining mechanism.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ASYNC_ERROR
An asynchronous operation was unable to obtain the service. |
| public static final int | FACTORY_ERROR
The service factory produced an invalid service object. |
| public static final int | FACTORY_EXCEPTION
The service factory threw an exception. |
| public static final int | FACTORY_RECURSION
The service factory resulted in a recursive call to itself for the requesting bundle. |
| public static final int | REMOTE
An error occurred invoking a remote service. |
| pack-priv static final long | |
| public static final int | SUBCLASSED
The exception is a subclass of ServiceException. |
| private final int | type
Type of service exception. |
| public static final int | UNREGISTERED
The service has been unregistered. |
| public static final int | UNSPECIFIED
No exception type is unspecified. |
| Access | Constructor and Description |
|---|---|
| public | ServiceException(String
The associated message. msg, Throwable The cause of this exception. cause)Creates a |
| public | |
| public | ServiceException(String
The associated message. msg, int The type for this exception. type, Throwable The cause of this exception. cause)Creates a |
| public | ServiceException(String
The message. msg, int The type for this exception. type)Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: The type of this exception.Returns the type for this exception or |
| ASYNC_ERROR | back to summary |
|---|---|
| public static final int ASYNC_ERROR An asynchronous operation was unable to obtain the service.
| |
| FACTORY_ERROR | back to summary |
|---|---|
| public static final int FACTORY_ERROR The service factory produced an invalid service object. | |
| FACTORY_EXCEPTION | back to summary |
|---|---|
| public static final int FACTORY_EXCEPTION The service factory threw an exception. | |
| FACTORY_RECURSION | back to summary |
|---|---|
| public static final int FACTORY_RECURSION The service factory resulted in a recursive call to itself for the requesting bundle.
| |
| REMOTE | back to summary |
|---|---|
| public static final int REMOTE An error occurred invoking a remote service. | |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID | |
| SUBCLASSED | back to summary |
|---|---|
| public static final int SUBCLASSED The exception is a subclass of ServiceException. The subclass should be examined for the type of the exception. | |
| type | back to summary |
|---|---|
| private final int type Type of service exception. | |
| UNREGISTERED | back to summary |
|---|---|
| public static final int UNREGISTERED The service has been unregistered. | |
| UNSPECIFIED | back to summary |
|---|---|
| public static final int UNSPECIFIED No exception type is unspecified. | |
| ServiceException | back to summary |
|---|---|
| public ServiceException(String msg, Throwable cause) Creates a | |
| ServiceException | back to summary |
|---|---|
| public ServiceException(String msg) Creates a
| |
| ServiceException | back to summary |
|---|---|
| public ServiceException(String msg, int type, Throwable cause) Creates a | |
| ServiceException | back to summary |
|---|---|
| public ServiceException(String msg, int type) Creates a
| |
| getType | back to summary |
|---|---|
| public int getType() Returns the type for this exception or
| |