com.unboundid.scim.sdk
Class SCIMException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.unboundid.scim.sdk.SCIMException
All Implemented Interfaces:
SCIMResponse, Serializable
Direct Known Subclasses:
InvalidResourceException, ResourceConflictException, ResourceNotFoundException, ServerErrorException, UnauthorizedException, UnsupportedOperationException

public class SCIMException
extends Exception
implements SCIMResponse

This class is the base class for all custom checked exceptions defined in the SCIM server.

See Also:
Serialized Form

Constructor Summary
protected SCIMException(int statusCode, String errorMessage)
          Create a new SCIM exception from the provided informatuon.
protected SCIMException(int statusCode, String errorMessage, Throwable cause)
          Create a new SCIM exception from the provided informatuon.
 
Method Summary
static SCIMException createException(int statusCode, String errorMessage)
          Create the appropriate SCIMException from the provided information.
 int getStatusCode()
          Retrieve the HTTP status code for this SCIM exception.
 void marshal(Marshaller marshaller, OutputStream outputStream)
          Marshals this response using the specified Marshaller to the specified OutputStream.
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SCIMException

protected SCIMException(int statusCode,
                        String errorMessage)
Create a new SCIM exception from the provided informatuon.

Parameters:
statusCode - The HTTP status code for this SCIM exception.
errorMessage - The error message for this SCIM exception.

SCIMException

protected SCIMException(int statusCode,
                        String errorMessage,
                        Throwable cause)
Create a new SCIM exception from the provided informatuon.

Parameters:
statusCode - The HTTP status code for this SCIM exception.
errorMessage - The error message for this SCIM exception.
cause - The cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Method Detail

getStatusCode

public int getStatusCode()
Retrieve the HTTP status code for this SCIM exception.

Returns:
The HTTP status code for this SCIM exception.

marshal

public final void marshal(Marshaller marshaller,
                          OutputStream outputStream)
                   throws Exception
Marshals this response using the specified Marshaller to the specified OutputStream.

Specified by:
marshal in interface SCIMResponse
Parameters:
marshaller - The Marshaller to use.
outputStream - The OutputStream to write to.
Throws:
Exception - if an error occurs while performing the marshaling.

createException

public static SCIMException createException(int statusCode,
                                            String errorMessage)
Create the appropriate SCIMException from the provided information.

Parameters:
statusCode - The HTTP status code for this SCIM exception.
errorMessage - The error message for this SCIM exception.
Returns:
The appropriate SCIMException from the provided information.


Copyright © 2011-2012 UnboundID. All Rights Reserved.