public class ContentServiceResponse extends Object implements Serializable
| Constructor and Description |
|---|
ContentServiceResponse(int requestId)
Convenience constructor for a response that conveys a success.
|
ContentServiceResponse(int requestId,
String errorMessage)
Convenience constructor for a response that conveys an error.
|
ContentServiceResponse(int requestId,
Throwable error)
Convenience constructor for a response that conveys an error.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getErrorMessage() |
int |
getRequestId() |
org.rhq.core.domain.content.ContentRequestStatus |
getStatus() |
void |
setErrorMessage(String errorMessage) |
void |
setErrorMessageFromThrowable(Throwable t)
Convienence method that sets the error message to the given throwable's stack trace dump.
|
void |
setRequestId(int requestId) |
void |
setStatus(org.rhq.core.domain.content.ContentRequestStatus status) |
public ContentServiceResponse(int requestId)
requestId - ID of the original requestpublic ContentServiceResponse(int requestId,
String errorMessage)
requestId - request the response applies toerrorMessage - message of the error encounteredpublic ContentServiceResponse(int requestId,
Throwable error)
requestId - request the response applies toerror - exception that occurredpublic int getRequestId()
public void setRequestId(int requestId)
public org.rhq.core.domain.content.ContentRequestStatus getStatus()
public void setStatus(org.rhq.core.domain.content.ContentRequestStatus status)
public String getErrorMessage()
public void setErrorMessage(String errorMessage)
public void setErrorMessageFromThrowable(Throwable t)
null, the error message will be set to null as if passing null to
setErrorMessage(String).t - throwable whose message and stack trace will make up the error message (may be null)Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.