public class ActionInvoker extends java.lang.Object implements RequestProcessor, HttpConstants
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
actionName |
protected CallProcessor |
afterCall |
protected CallProcessor |
beforeCall |
protected static byte[] |
EMPTY_RESPONSE |
protected int[] |
indexes |
protected boolean |
isStatic |
protected io.datatree.dom.TreeWriter |
jsonSerializer |
protected static org.slf4j.Logger |
logger |
protected java.lang.String[] |
names |
protected services.moleculer.context.CallOptions.Options |
opts |
protected java.lang.String |
pathPattern |
protected java.lang.String |
pathPrefix |
protected Route |
route |
protected services.moleculer.service.ServiceInvoker |
serviceInvoker |
protected AbstractTemplateEngine |
templateEngine |
ACCEPT, ACCEPT_ENCODING, AUTHORIZATION, CACHE_CONTROL, CHUNKED, CLOSE, CONNECT, CONNECTION, CONTENT_ENCODING, CONTENT_LENGTH, CONTENT_TYPE, CONTENT_TYPE_HTML, CONTENT_TYPE_JSON, COOKIE, DEFLATE, DELETE, ETAG, GET, GZIP, HEAD, IF_NONE_MATCH, KEEP_ALIVE, LOCATION, META_CONTENT_TYPE, META_HEADERS, META_LOCATION, META_STATUS, META_TEMPLATE, NO_CACHE, OPTIONS, PATCH, POST, PROPERTY_COOKIES, PROPERTY_SESSION_ID, PROPERTY_USER, PUT, SET_COOKIE, TRACE, TRANSFER_ENCODING, WWW_AUTHENTICATE, X_FORWARDED_FOR| Constructor and Description |
|---|
ActionInvoker(java.lang.String actionName,
java.lang.String pathPattern,
boolean isStatic,
java.lang.String pathPrefix,
int[] indexes,
java.lang.String[] names,
services.moleculer.context.CallOptions.Options opts,
services.moleculer.service.ServiceInvoker serviceInvoker,
AbstractTemplateEngine templateEngine,
Route route,
CallProcessor beforeCall,
CallProcessor afterCall) |
| Modifier and Type | Method and Description |
|---|---|
protected io.datatree.Tree |
parsePostBody(byte[] bytes) |
protected io.datatree.Tree |
parseQueryString(java.lang.String query) |
protected void |
sendResponse(WebRequest req,
WebResponse rsp,
io.datatree.Tree data) |
void |
service(WebRequest req,
WebResponse rsp)
Handles request of the HTTP client.
|
protected static final byte[] EMPTY_RESPONSE
protected static final org.slf4j.Logger logger
protected final java.lang.String actionName
protected final java.lang.String pathPattern
protected final boolean isStatic
protected final java.lang.String pathPrefix
protected final int[] indexes
protected final java.lang.String[] names
protected final services.moleculer.context.CallOptions.Options opts
protected final services.moleculer.service.ServiceInvoker serviceInvoker
protected final io.datatree.dom.TreeWriter jsonSerializer
protected final AbstractTemplateEngine templateEngine
protected final Route route
protected final CallProcessor beforeCall
protected final CallProcessor afterCall
public ActionInvoker(java.lang.String actionName,
java.lang.String pathPattern,
boolean isStatic,
java.lang.String pathPrefix,
int[] indexes,
java.lang.String[] names,
services.moleculer.context.CallOptions.Options opts,
services.moleculer.service.ServiceInvoker serviceInvoker,
AbstractTemplateEngine templateEngine,
Route route,
CallProcessor beforeCall,
CallProcessor afterCall)
public void service(WebRequest req, WebResponse rsp) throws java.lang.Exception
service in interface RequestProcessorreq - WebRequest object that contains the request the client made of
the ApiGatewayrsp - WebResponse object that contains the response the ApiGateway
returns to the clientjava.lang.Exception - if an input or output error occurs while the ApiGateway is
handling the HTTP requestprotected io.datatree.Tree parsePostBody(byte[] bytes)
throws java.lang.Exception
java.lang.Exceptionprotected io.datatree.Tree parseQueryString(java.lang.String query)
throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingExceptionprotected void sendResponse(WebRequest req, WebResponse rsp, io.datatree.Tree data) throws java.lang.Exception
java.lang.Exception