本文整理了Java中javax.ws.rs.Path
类的一些代码示例,展示了Path
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Path
类的具体详情如下:
包路径:javax.ws.rs.Path
类名称:Path
暂无
代码示例来源:origin: apache/incubator-druid
@GET
@Path("/runningTasks")
@Produces(MediaType.APPLICATION_JSON)
public Response getRunningTasks(
@QueryParam("type") String taskType,
@Context final HttpServletRequest req
)
{
return getTasks("running", null, null, null, taskType, req);
}
代码示例来源:origin: neo4j/neo4j
@POST
@Produces( MediaType.APPLICATION_JSON )
@Consumes( MediaType.APPLICATION_FORM_URLENCODED )
@Path( QUERY_PATH )
public Response formQueryBeans( @FormParam( "value" ) String data )
{
return queryBeans( data );
}
代码示例来源:origin: apache/incubator-druid
@POST
@Path("/suspendAll")
@Produces(MediaType.APPLICATION_JSON)
public Response suspendAll()
{
return suspendOrResumeAll(true);
}
代码示例来源:origin: prestodb/presto
@GET
@Path("coordinator")
@Produces(TEXT_PLAIN)
public Response getServerCoordinator()
{
if (coordinator) {
return Response.ok().build();
}
// return 404 to allow load balancers to only send traffic to the coordinator
return Response.status(Response.Status.NOT_FOUND).build();
}
}
代码示例来源:origin: prestodb/presto
@GET
@Path("{nodeId}/thread")
public Response getThreads(@PathParam("nodeId") String nodeId)
{
return proxyJsonResponse(nodeId, "v1/thread");
}
代码示例来源:origin: apache/incubator-dubbo
@Path("dubbo")
@Consumes({MediaType.APPLICATION_JSON, MediaType.TEXT_XML})
@Produces({MediaType.APPLICATION_JSON + "; " + "charset=UTF-8", MediaType.TEXT_XML + "; " + "charset=UTF-8"})
public interface DubboSwaggerService {
@GET
@Path("swagger")
public Response getListingJson(@Context Application app, @Context ServletConfig sc,
@Context HttpHeaders headers, @Context UriInfo uriInfo) throws JsonProcessingException;
}
代码示例来源:origin: prestodb/presto
@DELETE
@Path("{taskId}/results/{bufferId}")
@Produces(MediaType.APPLICATION_JSON)
public void abortResults(@PathParam("taskId") TaskId taskId, @PathParam("bufferId") OutputBufferId bufferId, @Context UriInfo uriInfo)
{
requireNonNull(taskId, "taskId is null");
requireNonNull(bufferId, "bufferId is null");
taskManager.abortTaskResults(taskId, bufferId);
}
代码示例来源:origin: apache/incubator-druid
@POST
@Path("/stop")
public Response stop(@Context final HttpServletRequest req)
{
authorizationCheck(req, Action.WRITE);
stopGracefully();
return Response.status(Response.Status.OK).build();
}
代码示例来源:origin: apache/incubator-druid
@POST
@Path("/assignTask")
@Consumes({MediaType.APPLICATION_JSON, SmileMediaTypes.APPLICATION_JACKSON_SMILE})
public Response assignTask(Task task)
{
try {
workerTaskMonitor.assignTask(task);
return Response.ok().build();
}
catch (RuntimeException ex) {
return Response.serverError().entity(ex.getMessage()).build();
}
}
代码示例来源:origin: neo4j/neo4j
@GET
@Path( PATH_LABELS )
public Response getAllLabels( @QueryParam( "in_use" ) @DefaultValue( "true" ) boolean inUse )
{
return output.ok( actions.getAllLabels( inUse ) );
}
代码示例来源:origin: neo4j/neo4j
@POST
@Path( PATH_AUTO_INDEXED_PROPERTIES )
public Response startAutoIndexingProperty( @PathParam( "type" ) String type, String property )
{
actions.startAutoIndexingProperty( type, property );
return output.ok( Representation.emptyRepresentation() );
}
代码示例来源:origin: apache/incubator-dubbo
@GET
@Path("swagger")
public Response getListingJson(@Context Application app, @Context ServletConfig sc,
@Context HttpHeaders headers, @Context UriInfo uriInfo) throws JsonProcessingException;
}
代码示例来源:origin: swagger-api/swagger-core
public static String getPath(javax.ws.rs.Path classLevelPath, javax.ws.rs.Path methodLevelPath, String parentPath, boolean isSubresource) {
if (classLevelPath == null && methodLevelPath == null && StringUtils.isEmpty(parentPath)) {
return null;
}
StringBuilder b = new StringBuilder();
appendPathComponent(parentPath, b);
if (classLevelPath != null && !isSubresource) {
appendPathComponent(classLevelPath.value(), b);
}
if (methodLevelPath != null) {
appendPathComponent(methodLevelPath.value(), b);
}
return b.length() == 0 ? "/" : b.toString();
}
代码示例来源:origin: apache/incubator-druid
@Deprecated
@POST
@Path("/{id}/shutdown")
@Produces(MediaType.APPLICATION_JSON)
@ResourceFilters(SupervisorResourceFilter.class)
public Response shutdown(@PathParam("id") final String id)
{
return terminate(id);
}
代码示例来源:origin: apache/incubator-druid
@POST
@Path("/resumeAll")
@Produces(MediaType.APPLICATION_JSON)
public Response resumeAll()
{
return suspendOrResumeAll(false);
}
代码示例来源:origin: prestodb/presto
@GET
@Path("state")
@Produces(APPLICATION_JSON)
public NodeState getServerState()
{
if (shutdownHandler.isShutdownRequested()) {
return SHUTTING_DOWN;
}
else {
return ACTIVE;
}
}
代码示例来源:origin: prestodb/presto
@GET
@Path("{taskId}/results/{bufferId}/{token}/acknowledge")
public void acknowledgeResults(
@PathParam("taskId") TaskId taskId,
@PathParam("bufferId") OutputBufferId bufferId,
@PathParam("token") final long token)
{
requireNonNull(taskId, "taskId is null");
requireNonNull(bufferId, "bufferId is null");
taskManager.acknowledgeTaskResults(taskId, bufferId, token);
}
代码示例来源:origin: apache/incubator-dubbo
@Path("dubbo")
@Consumes({MediaType.APPLICATION_JSON, MediaType.TEXT_XML})
@Produces({MediaType.APPLICATION_JSON + "; " + "charset=UTF-8", MediaType.TEXT_XML + "; " + "charset=UTF-8"})
public interface DubboSwaggerService {
@GET
@Path("swagger")
public Response getListingJson(@Context Application app, @Context ServletConfig sc,
@Context HttpHeaders headers, @Context UriInfo uriInfo) throws JsonProcessingException;
}
代码示例来源:origin: apache/incubator-druid
@POST
@Path("/resume")
public Response resumeHTTP(@Context final HttpServletRequest req) throws InterruptedException
{
authorizationCheck(req, Action.WRITE);
resume();
return Response.status(Response.Status.OK).build();
}
代码示例来源:origin: apache/incubator-dubbo
@GET
@Path("swagger")
public Response getListingJson(@Context Application app, @Context ServletConfig sc,
@Context HttpHeaders headers, @Context UriInfo uriInfo) throws JsonProcessingException;
}
内容来源于网络,如有侵权,请联系作者删除!