public interface ServiceRequest
Modifier and Type | Method and Description |
---|---|
org.apache.http.entity.BufferedHttpEntity |
invokePassThroughServiceAndGetEntity()
Invokes a response pass through enabled services and returns the
BufferedHttpEntity which will contain backend response.
|
<R> R |
invokePassThroughServiceAndGetEntity(Function<InputStream,R> typeParser)
Invokes a response pass through enabled service.
|
void |
invokeService(BiConsumer<DataControllerRequest,DataControllerResponse> responseConsumer)
Invokes a response pass through enabled service.
|
String |
invokeServiceAndGetJson()
Invokes the service and returns middleware response as JSON String.
|
Result |
invokeServiceAndGetResult()
Invokes the service and returns middleware response as Result object.
|
String invokeServiceAndGetJson() throws MiddlewareException
MiddlewareException
org.apache.http.entity.BufferedHttpEntity invokePassThroughServiceAndGetEntity() throws MiddlewareException
MiddlewareException
<R> R invokePassThroughServiceAndGetEntity(Function<InputStream,R> typeParser) throws MiddlewareException
typeParser
- The type parser to be used where R is the type of
response to be returnedMiddlewareException
Result invokeServiceAndGetResult() throws MiddlewareException
MiddlewareException
Result
void invokeService(BiConsumer<DataControllerRequest,DataControllerResponse> responseConsumer) throws MiddlewareException
responseConsumer
- The response consumerMiddlewareException
NullPointerException
Copyright © 2019. All rights reserved.