public class BundleMonitorExtension extends org.wisdom.api.DefaultController implements MonitorExtension
| Modifier and Type | Class and Description |
|---|---|
private class |
BundleMonitorExtension.BundleEventCounter
A simple class counting events.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) org.wisdom.api.templates.Template |
bundles
The template.
|
(package private) org.osgi.framework.BundleContext |
context
The bundle context.
|
private BundleMonitorExtension.BundleEventCounter |
counter
Just a simple bundle event counter.
|
ACCEPTED, BAD_GATEWAY, BAD_REQUEST, CONFLICT, CONTINUE, CREATED, EXPECTATION_FAILED, FORBIDDEN, FOUND, GATEWAY_TIMEOUT, GONE, HTTP_VERSION_NOT_SUPPORTED, INTERNAL_SERVER_ERROR, LENGTH_REQUIRED, METHOD_NOT_ALLOWED, MOVED_PERMANENTLY, MULTIPLE_CHOICES, NO_CONTENT, NON_AUTHORITATIVE_INFORMATION, NOT_ACCEPTABLE, NOT_FOUND, NOT_IMPLEMENTED, NOT_MODIFIED, OK, PARTIAL_CONTENT, PAYMENT_REQUIRED, PRECONDITION_FAILED, PROXY_AUTHENTICATION_REQUIRED, REQUEST_ENTITY_TOO_LARGE, REQUEST_TIMEOUT, REQUEST_URI_TOO_LONG, REQUESTED_RANGE_NOT_SATISFIABLE, RESET_CONTENT, SEE_OTHER, SERVICE_UNAVAILABLE, SWITCHING_PROTOCOLS, TEMPORARY_REDIRECT, UNAUTHORIZED, UNSUPPORTED_MEDIA_TYPE, USE_PROXYACCEPT, ACCEPT_CHARSET, ACCEPT_ENCODING, ACCEPT_LANGUAGE, ACCEPT_RANGES, ACCESS_CONTROL_ALLOW_CREDENTIALS, ACCESS_CONTROL_ALLOW_HEADERS, ACCESS_CONTROL_ALLOW_METHODS, ACCESS_CONTROL_ALLOW_ORIGIN, ACCESS_CONTROL_EXPOSE_HEADERS, ACCESS_CONTROL_MAX_AGE, ACCESS_CONTROL_REQUEST_HEADERS, ACCESS_CONTROL_REQUEST_METHOD, AGE, ALLOW, AUTHORIZATION, CACHE_CONTROL, CONNECTION, CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_MD5, CONTENT_RANGE, CONTENT_TRANSFER_ENCODING, CONTENT_TYPE, COOKIE, DATE, ETAG, EXPECT, EXPIRES, FROM, HOST, IF_MATCH, IF_MODIFIED_SINCE, IF_NONE_MATCH, IF_RANGE, IF_UNMODIFIED_SINCE, LAST_MODIFIED, LOCATION, MAX_FORWARDS, NOCACHE_VALUE, ORIGIN, PRAGMA, PROXY_AUTHENTICATE, PROXY_AUTHORIZATION, RANGE, REFERER, RETRY_AFTER, SERVER, SET_COOKIE, SET_COOKIE2, TE, TRAILER, TRANSFER_ENCODING, UPGRADE, USER_AGENT, VARY, VIA, WARNING, WWW_AUTHENTICATE, X_FORWARD_FOR, X_WISDOM_DISABLED_ENCODING_HEADER| Constructor and Description |
|---|
BundleMonitorExtension() |
| Modifier and Type | Method and Description |
|---|---|
org.wisdom.api.http.Result |
bundle() |
org.wisdom.api.http.Result |
bundles() |
String |
category() |
private int |
getActiveBundleCount(List<BundleModel> bundles) |
private int |
getInstalledBundleCount(List<BundleModel> bundles) |
org.wisdom.api.http.Result |
installBundle(org.wisdom.api.http.FileItem bundle,
boolean startIfNeeded)
Installs a new bundle.
|
static boolean |
isFragment(org.osgi.framework.Bundle bundle)
Checks whether or not the given bundle is a fragment
|
String |
label() |
void |
start()
Starts the counter.
|
void |
stop()
Stops the counter.
|
org.wisdom.api.http.Result |
toggleBundle(long id)
Toggles the states of the bundle.
|
org.wisdom.api.http.Result |
uninstallBundle(long id)
Uninstalls the given bundle.
|
org.wisdom.api.http.Result |
updateBundle(long id)
Updates the given bundle.
|
String |
url() |
context, flash, flash, flash, logger, render, render, render, request, routes, session, session, sessionasync, badRequest, badRequest, badRequest, badRequest, forbidden, forbidden, forbidden, html, internalServerError, internalServerError, internalServerError, internalServerError, json, noContent, notFound, notFound, notFound, notFound, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, redirect, redirectTemporary, status, todo, unauthorized, unauthorized, unauthorized, xmlorg.wisdom.api.templates.Template bundles
org.osgi.framework.BundleContext context
private BundleMonitorExtension.BundleEventCounter counter
public void start()
public void stop()
public org.wisdom.api.http.Result bundle()
public org.wisdom.api.http.Result bundles()
private int getInstalledBundleCount(List<BundleModel> bundles)
private int getActiveBundleCount(List<BundleModel> bundles)
public org.wisdom.api.http.Result toggleBundle(long id)
id - the bundle's idpublic org.wisdom.api.http.Result updateBundle(long id)
id - the bundle's idpublic org.wisdom.api.http.Result installBundle(org.wisdom.api.http.FileItem bundle,
boolean startIfNeeded)
bundle - the bundle filestartIfNeeded - whether or not the bundle need to be startedpublic org.wisdom.api.http.Result uninstallBundle(long id)
id - the bundle's idpublic String label()
label in interface MonitorExtensionpublic String url()
url in interface MonitorExtensionpublic String category()
category in interface MonitorExtensionpublic static boolean isFragment(org.osgi.framework.Bundle bundle)
bundle - the bundletrue if the bundle is a fragment, false otherwise.Copyright © 2013–2015 Wisdom Framework. All rights reserved.