Package com.sun.xml.registry.common
Class JAXRResponseImpl
- java.lang.Object
-
- com.sun.xml.registry.common.JAXRResponseImpl
-
- All Implemented Interfaces:
JAXRResponse
- Direct Known Subclasses:
BulkResponseImpl
public class JAXRResponseImpl extends Object implements JAXRResponse
- Version:
- Author:
- kwalsh
-
-
Field Summary
Fields Modifier and Type Field Description protected StringrequestIdprotected intstatus-
Fields inherited from interface javax.xml.registry.JAXRResponse
STATUS_FAILURE, STATUS_SUCCESS, STATUS_UNAVAILABLE, STATUS_WARNING
-
-
Constructor Summary
Constructors Constructor Description JAXRResponseImpl()Creates new JAXRResponseImpl
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetRequestId()Returns the request id of the bulk response.intgetStatus()Returns the status of the response.booleanisAvailable()Returns true if a response is available, false otherwise.voidsetRequestId(String requestId)Sets the request id of the response.voidsetStatus(int status)Sets the status of the message.
-
-
-
Field Detail
-
requestId
protected String requestId
-
status
protected int status
-
-
Method Detail
-
getRequestId
public String getRequestId() throws JAXRException
Returns the request id of the bulk response.- Specified by:
getRequestIdin interfaceJAXRResponse- Returns:
- the request id
- Throws:
JAXRException- If the JAXR provider encounters an internal error
-
setRequestId
public void setRequestId(String requestId)
Sets the request id of the response. This is set before returning the response to the client.
-
getStatus
public int getStatus() throws JAXRExceptionReturns the status of the response. Once delivered to a client the status may still be updated by the provider in the case of an asynchronous connection.- Specified by:
getStatusin interfaceJAXRResponse- Returns:
- the status which is an integer enumerated value
- Throws:
JAXRException- If the JAXR provider encounters an internal error- See Also:
JAXRResponse.STATUS_SUCCESS
-
setStatus
public void setStatus(int status)
Sets the status of the message. This is set before returning the response to the client, except when asynchronous connections are used. Then the status may be changed from STATUS_UNAVAILABLE to the final status.
-
isAvailable
public boolean isAvailable() throws JAXRExceptionReturns true if a response is available, false otherwise. This is a polling method and must not block.- Specified by:
isAvailablein interfaceJAXRResponse- Returns:
trueif the response is available;falseotherwise- Throws:
JAXRException- If the JAXR provider encounters an internal error
-
-