@Entity public class Request extends SuperEntity<Long>
Request is uniquely identified by its URI
and response join ID
.
Both these attributes helps to join right request and response together.
Response
,
Serialized FormConstructor and Description |
---|
Request() |
Modifier and Type | Method and Description |
---|---|
static Request |
createRequest(String uri,
String responseJoinId,
String request,
Message msg)
Creates a new request.
|
boolean |
equals(Object obj)
Two entities are equal if their ID is equal.
|
Long |
getId()
Gets unique request ID.
|
Message |
getMessage()
Gets asynch.
|
Long |
getMsgId()
Gets message ID (only for asynchronous message).
|
String |
getNormalizedUri()
Gets normalized endpoint/target URI.
|
Instant |
getReqTimestamp()
Gets timestamp when request was send to
target URI . |
String |
getRequest()
Gets request content.
|
Response |
getResponse()
Gets response to this request.
|
String |
getResponseJoinId()
Gets identifier for pairing/joining request and response together.
|
String |
getUri()
Gets endpoint/target URI.
|
void |
setId(Long id)
Sets unique identifier of the entity.
|
void |
setMessage(Message message) |
void |
setMsgId(Long msgId) |
void |
setReqTimestamp(Instant reqTimestamp) |
void |
setRequest(String request) |
void |
setResponseJoinId(String responseJoinId)
Sets identifier for pairing/joining request and response together.
|
void |
setUri(String uri) |
String |
toHumanString()
Returns human readable entity identification with start and end round brackets.
|
String |
toString() |
hashCode, isNew
public static Request createRequest(String uri, String responseJoinId, String request, @Nullable Message msg)
uri
- the target URIresponseJoinId
- the identifier for pairing/joining request and response togetherrequest
- the request (envelope) itselfmsg
- the 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 Long getMsgId()
public String getResponseJoinId()
Message
or correlation ID or exchange ID or some ID that is unique with getUri()
uri.
This attribute helps to associate response to the right request.public void setResponseJoinId(String responseJoinId)
responseJoinId
- response join IDpublic String getUri()
public void setUri(String uri)
public String getNormalizedUri()
public String getRequest()
public void setRequest(String request)
public Instant getReqTimestamp()
target URI
.public void setReqTimestamp(Instant reqTimestamp)
@Nullable public Response getResponse()
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.