本文整理了Java中javax.ws.rs.POST.<init>()
方法的一些代码示例,展示了POST.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。POST.<init>()
方法的具体详情如下:
包路径:javax.ws.rs.POST
类名称:POST
方法名:<init>
暂无
代码示例来源:origin: weibocom/motan
@POST
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces(MediaType.APPLICATION_JSON)
Response add(@FormParam("id") int id, @FormParam("name") String name);
代码示例来源:origin: knowm/XChange
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Path("orders/cancel/{orderId}")
BankeraOrder cancelOrder(
@HeaderParam("Authorization") String authorization,
@PathParam("orderId") Long orderId,
BaseBankeraRequest request)
throws BankeraException, IOException;
代码示例来源:origin: apache/incubator-druid
@POST
@Path("/suspendAll")
@Produces(MediaType.APPLICATION_JSON)
public Response suspendAll()
{
return suspendOrResumeAll(true);
}
代码示例来源: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: apache/storm
@POST
@Path("/{func}")
public String post(@PathParam("func") String func, String args, @Context HttpServletRequest request) throws Exception {
meterHttpRequests.mark();
return responseDuration.time(() -> drpc.executeBlocking(func, args));
}
代码示例来源: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
@Produces(MediaType.APPLICATION_JSON)
public Response post()
{
return Response.ok(DEFAULT_RESPONSE_CONTENT).build();
}
}
代码示例来源:origin: apache/incubator-druid
@POST
public Response postMock(InputStream inputStream)
{
return Response.ok().build();
}
};
代码示例来源: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("/resumeAll")
@Produces(MediaType.APPLICATION_JSON)
public Response resumeAll()
{
return suspendOrResumeAll(false);
}
代码示例来源:origin: elasticjob/elastic-job-lite
/**
* 添加事件追踪数据源配置.
*
* @param config 事件追踪数据源配置
* @return 是否添加成功
*/
@POST
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public boolean add(final EventTraceDataSourceConfiguration config) {
return eventTraceDataSourceConfigurationService.add(config);
}
代码示例来源:origin: pentaho/pentaho-kettle
@POST
@Path( "/default/clear" )
@Consumes( { APPLICATION_JSON } )
public Response setDefault() {
return Response.ok( controller.clearDefaultRepository() ).build();
}
代码示例来源:origin: elasticjob/elastic-job-lite
/**
* 终止作业.
*
* @param serverIp 服务器IP地址
* @param jobName 作业名称
*/
@POST
@Path("/{serverIp}/jobs/{jobName}/shutdown")
public void shutdownServerJob(@PathParam("serverIp") final String serverIp, @PathParam("jobName") final String jobName) {
jobAPIService.getJobOperatorAPI().shutdown(Optional.of(jobName), Optional.of(serverIp));
}
代码示例来源: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: Graylog2/graylog2-server
@POST
@Timed
@ApiOperation(value = "Add a new named pattern", response = GrokPattern.class)
@AuditEvent(type = AuditEventTypes.GROK_PATTERN_CREATE)
public Response createPattern(@ApiParam(name = "pattern", required = true)
@Valid @NotNull GrokPattern pattern) throws ValidationException {
checkPermission(RestPermissions.INPUTS_CREATE);
// remove the ID from the pattern, this is only used to create new patterns
final GrokPattern newPattern = grokPatternService.save(pattern.toBuilder().id(null).build());
final URI patternUri = getUriBuilderToSelf().path(GrokResource.class, "listPattern").build(newPattern.id());
return Response.created(patternUri).entity(newPattern).build();
}
代码示例来源:origin: knowm/XChange
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Path("funds/{fund_id}/orders")
TheRockOrder placeOrder(
@PathParam("fund_id") TheRock.Pair currencyPair,
@HeaderParam(X_TRT_KEY) String publicKey,
@HeaderParam(X_TRT_SIGN) TheRockDigest signer,
@HeaderParam(X_TRT_NONCE) SynchronizedValueFactory<Long> nonceFactory,
TheRockOrder order)
throws TheRockException, IOException;
代码示例来源:origin: apache/incubator-druid
@POST
@Path("/terminateAll")
@Produces(MediaType.APPLICATION_JSON)
public Response terminateAll()
{
return asLeaderWithSupervisorManager(
manager -> {
manager.stopAndRemoveAllSupervisors();
return Response.ok(ImmutableMap.of("status", "success")).build();
}
);
}
代码示例来源:origin: prestodb/presto
@POST
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public MemoryInfo getMemoryInfo(MemoryPoolAssignmentsRequest request)
{
taskManager.updateMemoryPoolAssignments(request);
return memoryManager.getInfo();
}
代码示例来源:origin: pentaho/pentaho-kettle
@POST
@Path( "/default/set" )
@Consumes( { APPLICATION_JSON } )
public Response setDefault( RepositoryModel model ) {
return Response.ok( controller.setDefaultRepository( model.getDisplayName() ) ).build();
}
代码示例来源:origin: elasticjob/elastic-job-lite
/**
* 禁用作业.
*
* @param serverIp 服务器IP地址
* @param jobName 作业名称
*/
@POST
@Path("/{serverIp}/jobs/{jobName}/disable")
public void disableServerJob(@PathParam("serverIp") final String serverIp, @PathParam("jobName") final String jobName) {
jobAPIService.getJobOperatorAPI().disable(Optional.of(jobName), Optional.of(serverIp));
}
内容来源于网络,如有侵权,请联系作者删除!