static Representation from(String value) { for (Representation representation : values()) { if (representation.toString().equalsIgnoreCase(value)) { return representation; } } return null; }
static Representation from(String value) { for (Representation representation : values()) { if (representation.toString().equalsIgnoreCase(value)) { return representation; } } return null; }
static Representation from(String value) { for (Representation representation : values()) { if (representation.toString().equalsIgnoreCase(value)) { return representation; } } return null; }
/** * * @param probe * @return the collection of all observer methods, using basic representation */ static String createObserversJson(Page<ObserverMethod<?>> page, Probe probe, Representation representation) { JsonArrayBuilder observersBuilder = Json.arrayBuilder(); if (representation == null) { representation = Representation.BASIC; } for (ObserverMethod<?> observerMethod : page.getData()) { switch (representation) { case BASIC: observersBuilder.add(createBasicObserverJson(observerMethod, probe)); break; case FULL: observersBuilder.add(createFullObserverJson(observerMethod, probe)); break; default: throw new UnsupportedOperationException(representation.toString()); } } return createPageJson(page, observersBuilder); }
/** * * @param probe * @return the collection of all observer methods, using basic representation */ static String createObserversJson(Page<ObserverMethod<?>> page, Probe probe, Representation representation) { JsonArrayBuilder observersBuilder = Json.arrayBuilder(); if (representation == null) { representation = Representation.BASIC; } for (ObserverMethod<?> observerMethod : page.getData()) { switch (representation) { case BASIC: observersBuilder.add(createBasicObserverJson(observerMethod, probe)); break; case FULL: observersBuilder.add(createFullObserverJson(observerMethod, probe)); break; default: throw new UnsupportedOperationException(representation.toString()); } } return createPageJson(page, observersBuilder); }
/** * * @param probe * @return the collection of all observer methods, using basic representation */ static String createInvocationsJson(Page<Invocation> page, Probe probe, Representation representation) { JsonArrayBuilder invocationsBuilder = Json.arrayBuilder(); if (representation == null) { representation = Representation.BASIC; } for (Invocation invocation : page.getData()) { switch (representation) { case BASIC: invocationsBuilder.add(createBasicInvocationJson(invocation, probe)); break; case FULL: invocationsBuilder.add(createFullInvocationJson(invocation, probe)); break; default: throw new UnsupportedOperationException(representation.toString()); } } return createPageJson(page, invocationsBuilder); }
/** * * @param probe * @return the collection of all observer methods, using basic representation */ static String createInvocationsJson(Page<Invocation> page, Probe probe, Representation representation) { JsonArrayBuilder invocationsBuilder = Json.arrayBuilder(); if (representation == null) { representation = Representation.BASIC; } for (Invocation invocation : page.getData()) { switch (representation) { case BASIC: invocationsBuilder.add(createBasicInvocationJson(invocation, probe)); break; case FULL: invocationsBuilder.add(createFullInvocationJson(invocation, probe)); break; default: throw new UnsupportedOperationException(representation.toString()); } } return createPageJson(page, invocationsBuilder); }
/** * * @param probe * @return the collection of all observer methods, using basic representation */ static String createInvocationsJson(Page<Invocation> page, Probe probe, Representation representation) { JsonArrayBuilder invocationsBuilder = Json.arrayBuilder(); if (representation == null) { representation = Representation.BASIC; } for (Invocation invocation : page.getData()) { switch (representation) { case BASIC: invocationsBuilder.add(createBasicInvocationJson(invocation, probe)); break; case FULL: invocationsBuilder.add(createFullInvocationJson(invocation, probe)); break; default: throw new UnsupportedOperationException(representation.toString()); } } return createPageJson(page, invocationsBuilder); }
/** * * @param probe * @return the collection of all observer methods, using basic representation */ static String createInvocationsJson(Page<Invocation> page, Probe probe, Representation representation) { JsonArrayBuilder invocationsBuilder = Json.arrayBuilder(); if (representation == null) { representation = Representation.BASIC; } for (Invocation invocation : page.getData()) { switch (representation) { case BASIC: invocationsBuilder.add(createBasicInvocationJson(invocation, probe)); break; case FULL: invocationsBuilder.add(createFullInvocationJson(invocation, probe)); break; default: throw new UnsupportedOperationException(representation.toString()); } } return createPageJson(page, invocationsBuilder); }
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, Representation.FULL.toString())); addEntry(out, "beans", jsonDataProvider.receiveBeans(0, 0, null, Representation.FULL.toString())); addEntry(out, "fired-events", jsonDataProvider.receiveEvents(0, 0, null)); addEntry(out, "invocation-trees", jsonDataProvider.receiveInvocations(0, 0, null, Representation.FULL.toString())); addEntry(out, "contexts", jsonDataProvider.receiveContexts()); for (String contextKey : Components.INSPECTABLE_SCOPES.keySet()) { addEntry(out, "context-" + contextKey, jsonDataProvider.receiveContext(contextKey)); } // Intentionally do not export contextual instances out.close(); return bytes.toByteArray(); }
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, Representation.FULL.toString())); addEntry(out, "beans", jsonDataProvider.receiveBeans(0, 0, null, Representation.FULL.toString())); addEntry(out, "fired-events", jsonDataProvider.receiveEvents(0, 0, null)); addEntry(out, "invocation-trees", jsonDataProvider.receiveInvocations(0, 0, null, Representation.FULL.toString())); addEntry(out, "contexts", jsonDataProvider.receiveContexts()); for (String contextKey : Components.INSPECTABLE_SCOPES.keySet()) { addEntry(out, "context-" + contextKey, jsonDataProvider.receiveContext(contextKey)); } // Intentionally do not export contextual instances out.close(); return bytes.toByteArray(); }
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, Representation.FULL.toString())); addEntry(out, "beans", jsonDataProvider.receiveBeans(0, 0, null, Representation.FULL.toString())); addEntry(out, "fired-events", jsonDataProvider.receiveEvents(0, 0, null)); addEntry(out, "invocation-trees", jsonDataProvider.receiveInvocations(0, 0, null, Representation.FULL.toString())); addEntry(out, "contexts", jsonDataProvider.receiveContexts()); for (String contextKey : Components.INSPECTABLE_SCOPES.keySet()) { addEntry(out, "context-" + contextKey, jsonDataProvider.receiveContext(contextKey)); } // Intentionally do not export contextual instances out.close(); return bytes.toByteArray(); }
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, Representation.FULL.toString())); addEntry(out, "beans", jsonDataProvider.receiveBeans(0, 0, null, Representation.FULL.toString())); addEntry(out, "fired-events", jsonDataProvider.receiveEvents(0, 0, null)); addEntry(out, "invocation-trees", jsonDataProvider.receiveInvocations(0, 0, null, Representation.FULL.toString())); addEntry(out, "contexts", jsonDataProvider.receiveContexts()); for (String contextKey : Components.INSPECTABLE_SCOPES.keySet()) { addEntry(out, "context-" + contextKey, jsonDataProvider.receiveContext(contextKey)); } // Intentionally do not export contextual instances out.close(); return bytes.toByteArray(); }
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, Representation.FULL.toString())); addEntry(out, "beans", jsonDataProvider.receiveBeans(0, 0, null, Representation.FULL.toString())); addEntry(out, "fired-events", jsonDataProvider.receiveEvents(0, 0, null)); addEntry(out, "invocation-trees", jsonDataProvider.receiveInvocations(0, 0, null, Representation.FULL.toString())); addEntry(out, "contexts", jsonDataProvider.receiveContexts()); for (String contextKey : Components.INSPECTABLE_SCOPES.keySet()) { addEntry(out, "context-" + contextKey, jsonDataProvider.receiveContext(contextKey)); } // Intentionally do not export contextual instances out.close(); return bytes.toByteArray(); }
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, Representation.FULL.toString())); addEntry(out, "beans", jsonDataProvider.receiveBeans(0, 0, null, Representation.FULL.toString())); addEntry(out, "fired-events", jsonDataProvider.receiveEvents(0, 0, null)); addEntry(out, "invocation-trees", jsonDataProvider.receiveInvocations(0, 0, null, Representation.FULL.toString())); addEntry(out, "contexts", jsonDataProvider.receiveContexts()); for (String contextKey : Components.INSPECTABLE_SCOPES.keySet()) { addEntry(out, "context-" + contextKey, jsonDataProvider.receiveContext(contextKey)); } // Intentionally do not export contextual instances out.close(); return bytes.toByteArray(); }
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, Representation.FULL.toString())); addEntry(out, "beans", jsonDataProvider.receiveBeans(0, 0, null, Representation.FULL.toString())); addEntry(out, "fired-events", jsonDataProvider.receiveEvents(0, 0, null)); addEntry(out, "invocation-trees", jsonDataProvider.receiveInvocations(0, 0, null, Representation.FULL.toString())); addEntry(out, "contexts", jsonDataProvider.receiveContexts()); for (String contextKey : Components.INSPECTABLE_SCOPES.keySet()) { addEntry(out, "context-" + contextKey, jsonDataProvider.receiveContext(contextKey)); } // Intentionally do not export contextual instances out.close(); return bytes.toByteArray(); }
static Representation from(String value) { for (Representation representation : values()) { if (representation.toString().equalsIgnoreCase(value)) { return representation; } } return null; }
static Representation from(String value) { for (Representation representation : values()) { if (representation.toString().equalsIgnoreCase(value)) { return representation; } } return null; }
static Representation from(String value) { for (Representation representation : values()) { if (representation.toString().equalsIgnoreCase(value)) { return representation; } } return null; }
static Representation from(String value) { for (Representation representation : values()) { if (representation.toString().equalsIgnoreCase(value)) { return representation; } } return null; }