Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.clustermate.jaxrs;
 
 import javax.ws.rs.*;
 
Interface used for handling Cluster state information; both updates between nodes and status requests by clients.
@Path("/v/node")
public class NodeResource
    protected final ClusterInfoHandler _handler;
    
    public NodeResource(ClusterInfoHandler h) {
         = h;
    }
    /*
    /**********************************************************************
    /* Entry points
    /**********************************************************************
     */
    
    
Simple read request for getting snapshot of Cluster status as seen by this node.
    @GET
    @Path("status")
    @Timed
    public Response getStatus(@Context UriInfo uriInfo)
    {
        JaxrsHttpResponse response = new JaxrsHttpResponse();
        // do we need headers? Shouldnt?
        .getStatus(new JaxrsHttpRequest(uriInfonull"".), responsenull);
        return response.buildResponse();
    }
New to GrepCode? Check out our FAQ X