@Entity public class Request extends Object implements HumanReadable
URI
and response join ID
.
Both these attributes helps to join right request and response together.Response
Constructor and Description |
---|
Request()
Default public constructor.
|
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) |
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.
|
Date |
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.
|
int |
hashCode() |
void |
setId(Long id) |
void |
setMessage(Message message) |
void |
setMsgId(Long msgId) |
void |
setReqTimestamp(Date 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() |
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()
public void setId(Long id)
@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 Date getReqTimestamp()
target URI
.public void setReqTimestamp(Date reqTimestamp)
@Nullable public Response getResponse()
public String toHumanString()
HumanReadable
toHumanString
in interface HumanReadable
Copyright © 2016. All rights reserved.