@Override protected void delete(JsonDataProvider jsonDataProvider, String[] resourcePathParts, HttpServletRequest req, HttpServletResponse resp) throws IOException { append(resp, jsonDataProvider.clearEvents()); } }),
@Override protected void delete(JsonDataProvider jsonDataProvider, String[] resourcePathParts, HttpServletRequest req, HttpServletResponse resp) throws IOException { append(resp, jsonDataProvider.clearInvocations()); } }),
@Override protected void get(JsonDataProvider jsonDataProvider, String[] resourcePathParts, HttpServletRequest req, HttpServletResponse resp) throws IOException { appendFound(resp, jsonDataProvider.receiveBean(resourcePathParts[1], Boolean.valueOf(req.getParameter(PARAM_TRANSIENT_DEPENDENCIES)), Boolean.valueOf(req.getParameter(PARAM_TRANSIENT_DEPENDENTS)))); } }),
static byte[] exportJsonData(JsonDataProvider jsonDataProvider) throws IOException { ByteArrayOutputStream bytes = new ByteArrayOutputStream(); ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(bytes)); addEntry(out, "deployment", jsonDataProvider.receiveDeployment()); addEntry(out, "observers", jsonDataProvider.receiveObservers(0, 0, null, "FULL")); addEntry(out, "beans", jsonDataProvider.receiveBeans(0, 0, null, "FULL")); addEntry(out, "fired-events", jsonDataProvider.receiveEvents(0, 0, null)); addEntry(out, "invocation-trees", jsonDataProvider.receiveInvocations(0, 0, null, "FULL")); addEntry(out, "contexts", jsonDataProvider.receiveContexts()); for (String contextKey : INSPECTABLE_SCOPES.keySet()) { addEntry(out, "context-" + contextKey, jsonDataProvider.receiveContext(contextKey)); } // Intentionally do not export contextual instances out.close(); return bytes.toByteArray(); }
@Override protected void get(JsonDataProvider jsonDataProvider, String[] resourcePathParts, HttpServletRequest req, HttpServletResponse resp) throws IOException { appendFound(resp, jsonDataProvider.receiveContext(resourcePathParts[1])); } }),
@Override protected void get(JsonDataProvider jsonDataProvider, String[] resourcePathParts, HttpServletRequest req, HttpServletResponse resp) throws IOException { append(resp, jsonDataProvider.receiveContexts()); } }),
@Override protected void get(JsonDataProvider jsonDataProvider, String[] resourcePathParts, HttpServletRequest req, HttpServletResponse resp) throws IOException { appendFound(resp, jsonDataProvider.receiveBeanInstance(resourcePathParts[1])); } }),
@Override protected void get(JsonDataProvider jsonDataProvider, String[] resourcePathParts, HttpServletRequest req, HttpServletResponse resp) throws IOException { append(resp, jsonDataProvider.receiveAvailableBeans(getPage(req), getPageSize(req), req.getParameter(FILTERS), req.getParameter(REPRESENTATION))); } }),
@Override protected void get(JsonDataProvider jsonDataProvider, String[] resourcePathParts, HttpServletRequest req, HttpServletResponse resp) throws IOException { append(resp, jsonDataProvider.receiveBeans(getPage(req), getPageSize(req), req.getParameter(FILTERS), req.getParameter(REPRESENTATION))); } }),
@Override protected void get(JsonDataProvider jsonDataProvider, String[] resourcePathParts, HttpServletRequest req, HttpServletResponse resp) throws IOException { append(resp, jsonDataProvider.receiveDeployment()); } }),
@Override public void handle(RoutingContext ctx) { switch (ctx.request().method()) { case GET: end(ctx.response(), jsonDataProvider.receiveEvents(getPage(ctx.request()), getPageSize(ctx.request()), ctx.request().getParam(FILTERS))); break; case DELETE: end(ctx.response(), jsonDataProvider.clearEvents()); default: ctx.response().setStatusCode(405).end(); } }
@Override public void handle(RoutingContext ctx) { switch (ctx.request().method()) { case GET: end(ctx.response(), jsonDataProvider.receiveInvocations(getPage(ctx.request()), getPageSize(ctx.request()), ctx.request().getParam(FILTERS), ctx.request().getParam(REPRESENTATION))); break; case DELETE: end(ctx.response(), jsonDataProvider.clearInvocations()); default: ctx.response().setStatusCode(405).end(); } }
@Override protected void get(JsonDataProvider jsonDataProvider, String[] resourcePathParts, HttpServletRequest req, HttpServletResponse resp) throws IOException { append(resp, jsonDataProvider.receiveEvents(getPage(req), getPageSize(req), req.getParameter(FILTERS))); }
static byte[] exportJsonData(JsonDataProvider jsonDataProvider) throws IOException { ByteArrayOutputStream bytes = new ByteArrayOutputStream(); ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(bytes)); addEntry(out, "deployment", jsonDataProvider.receiveDeployment()); addEntry(out, "observers", jsonDataProvider.receiveObservers(0, 0, null, "FULL")); addEntry(out, "beans", jsonDataProvider.receiveBeans(0, 0, null, "FULL")); addEntry(out, "fired-events", jsonDataProvider.receiveEvents(0, 0, null)); addEntry(out, "invocation-trees", jsonDataProvider.receiveInvocations(0, 0, null, "FULL")); addEntry(out, "contexts", jsonDataProvider.receiveContexts()); for (String contextKey : INSPECTABLE_SCOPES.keySet()) { addEntry(out, "context-" + contextKey, jsonDataProvider.receiveContext(contextKey)); } // Intentionally do not export contextual instances out.close(); return bytes.toByteArray(); }
@Override protected void get(JsonDataProvider jsonDataProvider, String[] resourcePathParts, HttpServletRequest req, HttpServletResponse resp) throws IOException { appendFound(resp, jsonDataProvider.receiveContext(resourcePathParts[1])); } }),
@Override protected void get(JsonDataProvider jsonDataProvider, String[] resourcePathParts, HttpServletRequest req, HttpServletResponse resp) throws IOException { append(resp, jsonDataProvider.receiveContexts()); } }),
@Override protected void get(JsonDataProvider jsonDataProvider, String[] resourcePathParts, HttpServletRequest req, HttpServletResponse resp) throws IOException { appendFound(resp, jsonDataProvider.receiveBeanInstance(resourcePathParts[1])); } }),
@Override protected void get(JsonDataProvider jsonDataProvider, String[] resourcePathParts, HttpServletRequest req, HttpServletResponse resp) throws IOException { append(resp, jsonDataProvider.receiveAvailableBeans(getPage(req), getPageSize(req), req.getParameter(FILTERS), req.getParameter(REPRESENTATION))); } }),
@Override protected void get(JsonDataProvider jsonDataProvider, String[] resourcePathParts, HttpServletRequest req, HttpServletResponse resp) throws IOException { append(resp, jsonDataProvider.receiveBeans(getPage(req), getPageSize(req), req.getParameter(FILTERS), req.getParameter(REPRESENTATION))); } }),
@Override protected void get(JsonDataProvider jsonDataProvider, String[] resourcePathParts, HttpServletRequest req, HttpServletResponse resp) throws IOException { append(resp, jsonDataProvider.receiveDeployment()); } }),