io.nosqlbench.docsys.endpoints.DocServerStatusEndpoint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of driver-cql-shaded Show documentation
Show all versions of driver-cql-shaded Show documentation
A Shaded CQL ActivityType driver for http://nosqlbench.io/
package io.nosqlbench.docsys.endpoints;
import io.nosqlbench.docsys.api.WebServiceObject;
import io.nosqlbench.docsys.core.NBWebServer;
import io.nosqlbench.nb.annotations.Service;
import jakarta.inject.Singleton;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.Configuration;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.MediaType;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@Service(value = WebServiceObject.class, selector = "docserver-status")
@Singleton
@Path("_")
public class DocServerStatusEndpoint implements WebServiceObject {
private final static Logger logger =
LogManager.getLogger(DocServerStatusEndpoint.class);
@Context
private Configuration config;
private String name;
@GET
@Path("status")
@Produces(MediaType.APPLICATION_JSON)
public String getStats() {
NBWebServer s = (NBWebServer) config.getProperty("server");
return s.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy