public class ServiceRequestExecutorImpl extends Object implements IServiceRequestExecutor
IServiceConnector.
- Invoke handler set on streamHandler(IAsyncHandler) chunks stream
through request chain, into connector).
- Invoke and evaluate response chain.
- Return results via resultHandler.
In the case of failure, the resultHandler is called at the earliest
opportunity.| Constructor and Description |
|---|
ServiceRequestExecutorImpl(io.apiman.gateway.engine.beans.ServiceRequest serviceRequest,
IAsyncResultHandler<IEngineResult> resultHandler,
io.apiman.gateway.engine.beans.Service service,
IPolicyContext context,
List<io.apiman.gateway.engine.beans.Policy> policies,
IPolicyFactory policyFactory,
IConnectorFactory connectorFactory)
Constructs a new
ServiceRequestExecutorImpl. |
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Execute the policy chain and request.
|
protected void |
handleStream()
Called when the service connector is ready to receive data from the inbound
client request.
|
boolean |
isFinished()
Policy request-response sequence has completed.
|
void |
streamHandler(IAsyncHandler<ISignalWriteStream> handler)
Indicates when the back-end connector is ready to handle streamed data.
|
public ServiceRequestExecutorImpl(io.apiman.gateway.engine.beans.ServiceRequest serviceRequest,
IAsyncResultHandler<IEngineResult> resultHandler,
io.apiman.gateway.engine.beans.Service service,
IPolicyContext context,
List<io.apiman.gateway.engine.beans.Policy> policies,
IPolicyFactory policyFactory,
IConnectorFactory connectorFactory)
ServiceRequestExecutorImpl.serviceRequest - resultHandler - service - context - policies - policyFactory - connectorFactory - public void execute()
IServiceRequestExecutorexecute in interface IServiceRequestExecutorIServiceRequestExecutor.execute()protected void handleStream()
public boolean isFinished()
IServiceRequestExecutorisFinished in interface IServiceRequestExecutorIServiceRequestExecutor.isFinished()public void streamHandler(IAsyncHandler<ISignalWriteStream> handler)
IServiceRequestExecutorstreamHandler in interface IServiceRequestExecutorIServiceRequestExecutor.streamHandler(io.apiman.gateway.engine.async.IAsyncHandler)Copyright © 2015 JBoss, a division of Red Hat. All rights reserved.