Top Description Fields Constructors Methods
javax.xml.registry

public Class JAXRException

extends Exception
implements JAXRResponse
Class Inheritance
All Implemented Interfaces
javax.xml.registry.JAXRResponse
Known Direct Subclasses
javax.xml.registry.RegistryException, javax.xml.registry.UnexpectedObjectException, javax.xml.registry.UnsupportedCapabilityException, javax.xml.registry.InvalidRequestException

Signals that a JAXR exception has occurred. It contains no members other than the standard reason String.
Authors
Nicholas Kassem, Mark Hapner, Rajiv Mordani, Farrukh Najmi
See Also
JAXRResponse

Field Summary

Modifier and TypeField and Description
protected Throwable
cause

Hides java.lang.Throwable.cause.

The Throwable that caused this JAXRException to occur.

Constructor Summary

AccessConstructor and Description
public
JAXRException()

Constructs a JAXRException object with no reason or embedded Throwable.

public
JAXRException(String
a description of what caused the exception
reason
)

Constructs a JAXRException object with the given String as the reason for the exception being thrown.

public
JAXRException(String
a description of what caused the exception
reason
,
Throwable
a Throwable object that is to be embedded in this JAXRException object
cause
)

Constructs a JAXRException object with the given String as the reason for the exception being thrown and the given Throwable object as an embedded Throwable.

public
JAXRException(Throwable
the Throwable that caused this Exception
cause
)

Constructs a JAXRException object initialized with the given Throwable object.

Method Summary

Modifier and TypeMethod and Description
public Throwable

Returns:

the embedded Throwable or null if there is none
getCause
()

Overrides java.lang.Throwable.getCause.

Returns the Throwable embedded in this JAXRException if there is one.
public String

Returns:

the error or warning message for this JAXRException or, if it has none, the message of the embedded Throwable, if there is one
getMessage
()

Overrides java.lang.Throwable.getMessage.

Returns the detail message for this JAXRException object.
public String
getRequestId()

Implements javax.xml.registry.JAXRResponse.getRequestId.

Returns the unique id for the request that generated this response.
public int
getStatus()

Implements javax.xml.registry.JAXRResponse.getStatus.

Returns the status for this response.
public synchronized Throwable

Returns:

a reference to this Throwable instance.
initCause
(Throwable
the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
cause
)

Overrides java.lang.Throwable.initCause.

Initializes the cause of this throwable to the specified value.
public boolean
isAvailable()

Implements javax.xml.registry.JAXRResponse.isAvailable.

Returns true if a response is available, false otherwise.

Field Detail

causeback to summary
protected Throwable cause

Hides java.lang.Throwable.cause.

The Throwable that caused this JAXRException to occur. This is used when a JAXRException has a nested Throwable.

Constructor Detail

JAXRExceptionback to summary
public JAXRException()

Constructs a JAXRException object with no reason or embedded Throwable.

JAXRExceptionback to summary
public JAXRException(String reason)

Constructs a JAXRException object with the given String as the reason for the exception being thrown.

Parameters
reason:String

a description of what caused the exception

JAXRExceptionback to summary
public JAXRException(String reason, Throwable cause)

Constructs a JAXRException object with the given String as the reason for the exception being thrown and the given Throwable object as an embedded Throwable.

Parameters
reason:String

a description of what caused the exception

cause:Throwable

a Throwable object that is to be embedded in this JAXRException object

JAXRExceptionback to summary
public JAXRException(Throwable cause)

Constructs a JAXRException object initialized with the given Throwable object.

Parameters
cause:Throwable

the Throwable that caused this Exception

Method Detail

getCauseback to summary
public Throwable getCause()

Overrides java.lang.Throwable.getCause.

Returns the Throwable embedded in this JAXRException if there is one. Otherwise, this method returns null.

Returns:Throwable

the embedded Throwable or null if there is none

getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Returns the detail message for this JAXRException object.

If there is an embedded Throwable, and if the JAXRException object has no detail message of its own, this method will return the detail message from the embedded Throwable.

Returns:String

the error or warning message for this JAXRException or, if it has none, the message of the embedded Throwable, if there is one

getRequestIdback to summary
public String getRequestId()

Implements javax.xml.registry.JAXRResponse.getRequestId.

Doc from javax.xml.registry.JAXRResponse.getRequestId.

Returns the unique id for the request that generated this response.

Capability Level: 0
Returns:String

the request id

getStatusback to summary
public int getStatus()

Implements javax.xml.registry.JAXRResponse.getStatus.

Doc from javax.xml.registry.JAXRResponse.getStatus.

Returns the status for this response.

Capability Level: 0
Returns:int

the status which is an integer enumerated value

initCauseback to summary
public synchronized Throwable initCause(Throwable cause)

Overrides java.lang.Throwable.initCause.

Initializes the cause of this throwable to the specified value. (The cause is the throwable that caused this throwable to get thrown.)

This method can be called at most once. It is generally called from within the constructor, or immediately after creating the throwable. If this throwable was created with JAXRException(Throwable) or JAXRException(String, Throwable), this method cannot be called even once.

Parameters
cause:Throwable

the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

Returns:Throwable

a reference to this Throwable instance.

Exceptions
IllegalArgumentException:
if cause is this throwable. (A throwable cannot be its own cause.)
IllegalStateException:
if this throwable was created with JAXRException(Throwable) or JAXRException(String, Throwable), or this method has already been called on this throwable.
isAvailableback to summary
public boolean isAvailable() throws JAXRException

Implements javax.xml.registry.JAXRResponse.isAvailable.

Returns true if a response is available, false otherwise. This is a polling method and must not block.

Returns:boolean

Doc from javax.xml.registry.JAXRResponse.isAvailable.

true if the response is available; false otherwise

Exceptions
JAXRException:

Doc from javax.xml.registry.JAXRResponse.isAvailable.

If the JAXR provider encounters an internal error