@Entity public class Response extends SuperEntity<Long>
Request
,
Serialized FormConstructor and Description |
---|
Response() |
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)
Two entities are equal if their ID is equal.
|
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.
|
Instant |
getResTimestamp()
Gets timestamp when response/failed reason was received back.
|
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)
Sets unique identifier of the entity.
|
void |
setMessage(Message message) |
void |
setRequest(Request request) |
void |
setResponse(String response) |
void |
setResTimestamp(Instant resTimestamp) |
String |
toHumanString()
Returns human readable entity identification with start and end round brackets.
|
String |
toString() |
hashCode, isNew
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()
getId
in interface Identifiable<Long>
getId
in class SuperEntity<Long>
public void setId(Long id)
Identifiable
setId
in interface Identifiable<Long>
setId
in class SuperEntity<Long>
id
- unique identifier@Nullable public Request getRequest()
@Nullable public String getResponse()
getFailedReason()
must be filled.@Nullable public String getFailedReason()
public Instant getResTimestamp()
public void setResTimestamp(Instant resTimestamp)
public boolean isFailed()
failed reason
must be specified.true
if yes otherwise false
public void setFailed(boolean failed)
public boolean equals(Object obj)
SuperEntity
equals
in class SuperEntity<Long>
public String toString()
toString
in class SuperEntity<Long>
public String toHumanString()
HumanReadable
toHumanString
in interface HumanReadable
toHumanString
in class SuperEntity<Long>
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.