@Path(value="/") @Singleton public class JmxRestService extends Object implements ContainerRequestFilter
Modifier and Type | Field and Description |
---|---|
static String |
ATTRIBUTE_NAME |
private static String |
AUTHENTICATION_SCHEME |
private static String |
AUTHORIZATION_PROPERTY |
static String |
DOMAINS |
private JmxHelper |
helper |
static String |
HTML_PATH |
static org.objectweb.util.monolog.api.Logger |
logger |
(package private) static MBeanServer |
mbs |
static String |
OBJECT_NAME |
Constructor and Description |
---|
JmxRestService() |
private static final String AUTHORIZATION_PROPERTY
private static final String AUTHENTICATION_SCHEME
public static org.objectweb.util.monolog.api.Logger logger
static MBeanServer mbs
private final JmxHelper helper
public static final String HTML_PATH
public static final String DOMAINS
public static final String OBJECT_NAME
public static final String ATTRIBUTE_NAME
@GET @Path(value="/help") @Produces(value="text/html") public String info(@Context UriInfo uriInfo)
@GET @Path(value="/domains") @Produces(value="text/html") public String getDomains(@Context UriInfo uriInfo)
@GET @Path(value="/domains") @Produces(value="application/json") public Response getDomainsJson(@Context UriInfo uriInfo) throws Exception
Exception
@GET @Path(value="/domains/{domain}") @Produces(value="text/html") public String getDomain(@PathParam(value="domain") String domain, @Context UriInfo uriInfo) throws MalformedObjectNameException, NullPointerException
@GET @Path(value="/domains/{domain}") @Produces(value="application/json") public Response getDomainJson(@PathParam(value="domain") String domain, @Context UriInfo uriInfo) throws Exception
Exception
@GET @Path(value="/domains/{domain}/{objectName}") @Produces(value="text/html") public String getObjectName(@PathParam(value="domain") String domain, @PathParam(value="objectName") String objName, @Context UriInfo uriInfo) throws IntrospectionException, InstanceNotFoundException, MalformedObjectNameException, ReflectionException, NullPointerException
@GET @Path(value="/domains/{domain}/{objectName}") @Produces(value="application/json") public Response getObjectNameJson(@PathParam(value="domain") String domain, @PathParam(value="objectName") String objName, @Context UriInfo uriInfo) throws Exception
Exception
@GET @Path(value="/domains/{domain}/{objectName}/{attribute}") @Produces(value="text/plain") public String getAttribute(@PathParam(value="domain") String domain, @PathParam(value="objectName") String objectName, @PathParam(value="attribute") String attribute, @Context UriInfo uriInfo) throws Exception
Exception
private void openDomain(StringBuilder buff, String domain, int i)
private void closeDomain(StringBuilder buff)
private void openType(StringBuilder buff, String type, int i)
private void closeType(StringBuilder buff)
private void openAttribute(StringBuilder buff, UriInfo uriInfo, ObjectName objectName, int i) throws Exception
Exception
private void closeAttribute(StringBuilder buff)
@GET @Produces(value="application/json") public String getAllMBeanInfoJson(@Context UriInfo uriInfo) throws Exception
Exception
private String getAttribute(ObjectName objectName, String attributeName) throws AttributeNotFoundException, InstanceNotFoundException, MBeanException, ReflectionException
public void filter(ContainerRequestContext requestContext) throws IOException
filter
in interface ContainerRequestFilter
IOException
Copyright © 2016 ScalAgent D.T.. All Rights Reserved.