@Transactional @Service public class RequestResponseServiceDefaultImpl extends Object implements RequestResponseService
RequestResponseService
interface.
Implementation saves directly requests/responses into database in synchronous manner.
Constructor and Description |
---|
RequestResponseServiceDefaultImpl() |
Modifier and Type | Method and Description |
---|---|
List<Request> |
findByCriteria(Instant from,
Instant to,
String subUri,
String subRequest)
Finds requests which matches the criteria filter.
|
Request |
findLastRequest(String uri,
String responseJoinId)
Gets last request specified by target URI and response-join ID.
|
void |
insertRequest(Request request)
Inserts new request.
|
void |
insertResponse(Response response)
Inserts new response.
|
public void insertRequest(Request request)
RequestResponseService
insertRequest
in interface RequestResponseService
request
- the requestpublic void insertResponse(Response response)
RequestResponseService
insertResponse
in interface RequestResponseService
response
- the response@Nullable public Request findLastRequest(String uri, String responseJoinId)
RequestResponseService
Note: there can be more requests for one message and external system because of reprocessing the message. Therefore last request is used.
findLastRequest
in interface RequestResponseService
uri
- the target URIresponseJoinId
- the identifier for pairing/joining request and response togetherpublic List<Request> findByCriteria(Instant from, Instant to, String subUri, String subRequest)
RequestResponseService
findByCriteria
in interface RequestResponseService
from
- the timestamp fromto
- the timestamp tosubUri
- the substring of URIsubRequest
- the substring of request contentRequest
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.