@Entity public class Response extends Object implements HumanReadable
Request
Constructor and Description |
---|
Response()
Default public constructor.
|
Modifier and Type | Method and Description |
---|---|
static Response |
createResponse(Request request,
String response,
String failedReason,
Message msg)
Creates a new response.
|
boolean |
equals(Object obj) |
String |
getFailedReason()
Gets reason (SOAP fault, exception, stackTrace, ...) why communication failed.
|
Long |
getId()
Gets unique response ID.
|
Message |
getMessage()
Gets asynch.
|
Request |
getRequest()
Gets corresponding request to this response.
|
String |
getResponse()
Gets response.
|
Date |
getResTimestamp()
Gets timestamp when response/failed reason was received back.
|
int |
hashCode() |
boolean |
isFailed()
Has been communication failed?
If failed then
failed reason must be specified. |
void |
setFailed(boolean failed) |
void |
setFailedReason(String failedReason) |
void |
setId(Long id) |
void |
setMessage(Message message) |
void |
setRequest(Request request) |
void |
setResponse(String response) |
void |
setResTimestamp(Date resTimestamp) |
String |
toHumanString()
Returns human readable entity identification with start and end round brackets.
|
String |
toString() |
public static Response createResponse(@Nullable Request request, @Nullable String response, @Nullable String failedReason, @Nullable Message msg)
request
- the corresponding request to this response; sometimes can happen that it's not possible to find
request and even so it's good to save responseresponse
- the response (response or failed reason must not be empty)failedReason
- the failed reason (response or failed reason must not be empty)msg
- the asynchronous messagepublic Long getId()
public void setId(Long id)
@Nullable public Request getRequest()
@Nullable public String getResponse()
getFailedReason()
must be filled.@Nullable public String getFailedReason()
public Date getResTimestamp()
public void setResTimestamp(Date resTimestamp)
public boolean isFailed()
failed reason
must be specified.true
if yes otherwise false
public void setFailed(boolean failed)
public String toHumanString()
HumanReadable
toHumanString
in interface HumanReadable
Copyright © 2016. All rights reserved.