@Override public void init(ServletConfig config) throws ServletException { super.init(config); // Lookup the set of handlers to bind to this api endpoint and // populate the registry with them String handlers = config.getInitParameter(HANDLERS_PARAM); Key<Set<Object>> handlerKey; if (handlers == null || "".equals(handlers)) { handlerKey = DEFAULT_HANDLER_KEY; } else { handlerKey = Key.get(new TypeLiteral<Set<Object>>(){}, Names.named(handlers)); } this.dispatcher.addHandlers(injector.getInstance(handlerKey)); this.dispatcher.addHandlers(Collections.<Object>singleton(new SystemHandler(dispatcher))); }
protected RestHandler getRestHandler(HttpServletRequest servletRequest) { // TODO Rework to allow sub-services String path = servletRequest.getPathInfo(); // TODO - This shouldnt be on BaseRequestItem String method = servletRequest.getParameter(X_HTTP_METHOD_OVERRIDE); if (method == null) { method = servletRequest.getMethod(); } // Always returns a non-null handler. return dispatcher.getRestHandler(path, method.toUpperCase()); }
/** * Wrap call to dispatcher to allow for implementation specific overrides * and servlet-request contextual handling */ protected RpcHandler getHandler(JSONObject rpc, HttpServletRequest request) { return dispatcher.getRpcHandler(rpc); }
@Operation(httpMethods = "GET") public Set<String> listMethods(RequestItem request) { if ("protocol".equalsIgnoreCase(request.getFilterBy()) && FilterOperation.equals == request.getFilterOperation() && "REST".equalsIgnoreCase(request.getFilterValue())) { return registry.getSupportedRestServices(); } return registry.getSupportedRpcServices(); } }
@Operation(httpMethods = "GET") public Set<String> listMethods(RequestItem request) { if ("protocol".equalsIgnoreCase(request.getFilterBy()) && FilterOperation.equals == request.getFilterOperation() && "REST".equalsIgnoreCase(request.getFilterValue())) { return registry.getSupportedRestServices(); } return registry.getSupportedRpcServices(); } }
@Override public void init(ServletConfig config) throws ServletException { super.init(config); // Lookup the set of handlers to bind to this api endpoint and // populate the registry with them String handlers = config.getInitParameter(HANDLERS_PARAM); Key<Set<Object>> handlerKey; if (handlers == null || "".equals(handlers)) { handlerKey = DEFAULT_HANDLER_KEY; } else { handlerKey = Key.get(new TypeLiteral<Set<Object>>(){}, Names.named(handlers)); } this.dispatcher.addHandlers(injector.getInstance(handlerKey)); this.dispatcher.addHandlers(Collections.<Object>singleton(new SystemHandler(dispatcher))); }
protected RestHandler getRestHandler(HttpServletRequest servletRequest) { // TODO Rework to allow sub-services String path = servletRequest.getPathInfo(); // TODO - This shouldnt be on BaseRequestItem String method = servletRequest.getParameter(X_HTTP_METHOD_OVERRIDE); if (method == null) { method = servletRequest.getMethod(); } // Always returns a non-null handler. return dispatcher.getRestHandler(path, method.toUpperCase()); }
/** * Wrap call to dispatcher to allow for implementation specific overrides * and servlet-request contextual handling */ protected RpcHandler getHandler(JSONObject rpc, HttpServletRequest request) { return dispatcher.getRpcHandler(rpc); }
@Operation(httpMethods = "GET") public Set<String> listMethods(RequestItem request) { if ("protocol".equalsIgnoreCase(request.getFilterBy()) && FilterOperation.equals == request.getFilterOperation() && "REST".equalsIgnoreCase(request.getFilterValue())) { return registry.getSupportedRestServices(); } return registry.getSupportedRpcServices(); } }
@Override public void init(ServletConfig config) throws ServletException { super.init(config); // Lookup the set of handlers to bind to this api endpoint and // populate the registry with them String handlers = config.getInitParameter(HANDLERS_PARAM); Key<Set<Object>> handlerKey; if (handlers == null || "".equals(handlers)) { handlerKey = DEFAULT_HANDLER_KEY; } else { handlerKey = Key.get(new TypeLiteral<Set<Object>>(){}, Names.named(handlers)); } this.dispatcher.addHandlers(injector.getInstance(handlerKey)); this.dispatcher.addHandlers(Collections.<Object>singleton(new SystemHandler(dispatcher))); }
protected RestHandler getRestHandler(HttpServletRequest servletRequest) { // TODO Rework to allow sub-services String path = servletRequest.getPathInfo(); // TODO - This shouldnt be on BaseRequestItem String method = servletRequest.getParameter(X_HTTP_METHOD_OVERRIDE); if (method == null) { method = servletRequest.getMethod(); } // Always returns a non-null handler. return dispatcher.getRestHandler(path, method.toUpperCase()); }
/** * Wrap call to dispatcher to allow for implementation specific overrides * and servlet-request contextual handling */ protected RpcHandler getHandler(JSONObject rpc, HttpServletRequest request) { return dispatcher.getRpcHandler(rpc); }
@Operation(httpMethods = "GET") public Set<String> listMethods(RequestItem request) { if ("protocol".equalsIgnoreCase(request.getFilterBy()) && FilterOperation.equals == request.getFilterOperation() && "REST".equalsIgnoreCase(request.getFilterValue())) { return registry.getSupportedRestServices(); } return registry.getSupportedRpcServices(); } }
@Override public void init(ServletConfig config) throws ServletException { super.init(config); // Lookup the set of handlers to bind to this api endpoint and // populate the registry with them String handlers = config.getInitParameter(HANDLERS_PARAM); Key<Set<Object>> handlerKey; if (handlers == null || "".equals(handlers)) { handlerKey = DEFAULT_HANDLER_KEY; } else { handlerKey = Key.get(new TypeLiteral<Set<Object>>(){}, Names.named(handlers)); } this.dispatcher.addHandlers(injector.getInstance(handlerKey)); this.dispatcher.addHandlers(Collections.<Object>singleton(new SystemHandler(dispatcher))); }
protected RestHandler getRestHandler(HttpServletRequest servletRequest) { // TODO Rework to allow sub-services String path = servletRequest.getPathInfo(); // TODO - This shouldnt be on BaseRequestItem String method = servletRequest.getParameter(X_HTTP_METHOD_OVERRIDE); if (method == null) { method = servletRequest.getMethod(); } // Always returns a non-null handler. return dispatcher.getRestHandler(path, method.toUpperCase()); }
/** * Wrap call to dispatcher to allow for implementation specific overrides * and servlet-request contextual handling */ protected RpcHandler getHandler(JSONObject rpc, HttpServletRequest request) { return dispatcher.getRpcHandler(rpc); }
@Operation(httpMethods = "GET") public Set<String> listMethods(RequestItem request) { if ("protocol".equalsIgnoreCase(request.getFilterBy()) && FilterOperation.equals == request.getFilterOperation() && "REST".equalsIgnoreCase(request.getFilterValue())) { return registry.getSupportedRestServices(); } return registry.getSupportedRpcServices(); } }
@Override public void init(ServletConfig config) throws ServletException { super.init(config); // Lookup the set of handlers to bind to this api endpoint and // populate the registry with them String handlers = config.getInitParameter(HANDLERS_PARAM); Key<Set<Object>> handlerKey; if (handlers == null || "".equals(handlers)) { handlerKey = DEFAULT_HANDLER_KEY; } else { handlerKey = Key.get(new TypeLiteral<Set<Object>>(){}, Names.named(handlers)); } this.dispatcher.addHandlers(injector.getInstance(handlerKey)); this.dispatcher.addHandlers(Collections.<Object>singleton(new SystemHandler(dispatcher))); }
protected RestHandler getRestHandler(HttpServletRequest servletRequest) { // TODO Rework to allow sub-services String path = servletRequest.getPathInfo(); // TODO - This shouldnt be on BaseRequestItem String method = servletRequest.getParameter(X_HTTP_METHOD_OVERRIDE); if (method == null) { method = servletRequest.getMethod(); } // Always returns a non-null handler. return dispatcher.getRestHandler(path, method.toUpperCase()); }
/** * Wrap call to dispatcher to allow for implementation specific overrides * and servlet-request contextual handling */ protected RpcHandler getHandler(JSONObject rpc, HttpServletRequest request) { return dispatcher.getRpcHandler(rpc); }