org.terracotta.management.resource.services.AgentsResourceService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ehcache Show documentation
Show all versions of ehcache Show documentation
Ehcache is an open source, standards-based cache used to boost performance,
offload the database and simplify scalability. Ehcache is robust, proven and full-featured and
this has made it the most widely-used Java-based cache.
/* All content copyright (c) 2003-2012 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.*/
package org.terracotta.management.resource.services;
import org.terracotta.management.resource.AgentEntity;
import org.terracotta.management.resource.AgentMetadataEntity;
import org.terracotta.management.resource.Representable;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriInfo;
import java.util.Collection;
/**
*
* A common resource service interface for agents representing Terracotta monitorable entities. This resource service
* provides discovery of the agents and a top level summary of the {@link Representable} objects they publish.
*
*
* @author brandony
*
*/
public interface AgentsResourceService {
/**
*
* A top level resource that provides each agents root {@link Representable} objects.
*
*
* @param info - {@link UriInfo} for this resource request
* @return a collection of {@link AgentEntity} objects when successful.
*/
@GET
@Produces(MediaType.APPLICATION_JSON)
Collection getAgents(@Context UriInfo info);
/**
*
* A resource that provides discovery of all agents and reveals metadata about each agents API and state.
*
*
* @param info - {@link UriInfo} for this resource request
* @return a collection of {@link AgentMetadataEntity} objects when successful.
*/
@GET
@Path("/info")
@Produces(MediaType.APPLICATION_JSON)
Collection getAgentsMetadata(@Context UriInfo info);
}