com.sun.xml.registry.common
Class JAXRResponseImpl

java.lang.Object
  extended by 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
protected  String requestId
           
protected  int status
           
 
Fields inherited from interface javax.xml.registry.JAXRResponse
STATUS_FAILURE, STATUS_SUCCESS, STATUS_UNAVAILABLE, STATUS_WARNING
 
Constructor Summary
JAXRResponseImpl()
          Creates new JAXRResponseImpl
 
Method Summary
 String getRequestId()
          Returns the request id of the bulk response.
 int getStatus()
          Returns the status of the response.
 boolean isAvailable()
          Returns true if a response is available, false otherwise.
 void setRequestId(String requestId)
          Sets the request id of the response.
 void setStatus(int status)
          Sets the status of the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

requestId

protected String requestId

status

protected int status
Constructor Detail

JAXRResponseImpl

public JAXRResponseImpl()
Creates new JAXRResponseImpl

Method Detail

getRequestId

public String getRequestId()
                    throws JAXRException
Returns the request id of the bulk response.

Specified by:
getRequestId in interface JAXRResponse
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 JAXRException
Returns 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:
getStatus in interface JAXRResponse
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 JAXRException
Returns true if a response is available, false otherwise. This is a polling method and must not block.

Specified by:
isAvailable in interface JAXRResponse
Returns:
true if the response is available; false otherwise
Throws:
JAXRException - If the JAXR provider encounters an internal error


Copyright © 2005-2013 Oracle Corporation. All Rights Reserved.