本文整理了Java中org.glassfish.jersey.server.JSONP.<init>()
方法的一些代码示例,展示了JSONP.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSONP.<init>()
方法的具体详情如下:
包路径:org.glassfish.jersey.server.JSONP
类名称:JSONP
方法名:<init>
暂无
代码示例来源:origin: jersey/jersey
@GET
@JSONP(queryParam = JSONP.DEFAULT_QUERY)
public List<ChangeRecordBean> getChanges(@QueryParam(JSONP.DEFAULT_QUERY) String callback, @QueryParam("type") int type) {
return changes;
}
代码示例来源:origin: jersey/jersey
@GET
@Path("latest")
@JSONP
public ChangeRecordBean getLastChange(@QueryParam("callback") String callback, @QueryParam("type") int type) {
return changes.get(changes.size() - 1);
}
}
代码示例来源:origin: jersey/jersey
@GET
@JSONP
@Produces({"application/javascript", MediaType.APPLICATION_JSON})
public NonJaxbBean getSimpleBeanJSONP() {
return new NonJaxbBean();
}
}
代码示例来源:origin: jersey/jersey
@GET
@JSONP
@Produces({"application/javascript", MediaType.APPLICATION_JSON})
public NonJaxbBean getSimpleBeanJSONP() {
return new NonJaxbBean();
}
}
代码示例来源:origin: ef-labs/vertx-jersey
@GET
@Path("jsonp")
@JSONP(queryParam = "cb")
@Produces("application/javascript")
public MyObject getJsonPadding() {
MyObject o = new MyObject();
o.setName("Andy");
return o;
}
代码示例来源:origin: ef-labs/vertx-jersey
@GET
@JSONP(queryParam = "cb")
@Path("json")
@Produces({MediaType.APPLICATION_JSON, "application/javascript"})
public String getJson() {
return "{}";
}
代码示例来源:origin: smoketurner/notification
@GET
@JSONP
@Timed
@Produces({MediaType.APPLICATION_JSON, "application/javascript"})
@CacheControl(mustRevalidate = true, noCache = true, noStore = true)
public Response fetch() {
final Optional<Map<String, Rule>> rules;
try {
rules = store.fetch();
} catch (NotificationStoreException e) {
throw new NotificationException(
Response.Status.INTERNAL_SERVER_ERROR, "Unable to fetch rules", e);
}
if (!rules.isPresent()) {
throw new NotificationException(Response.Status.NOT_FOUND, "No rules found");
}
return Response.ok(rules.get()).build();
}
代码示例来源:origin: GeneralElectric/snowizard
/**
* Get a new ID as JSON
*
* @param agent
* User Agent
* @return generated ID
*/
@GET
@Timed
@JSONP(callback = "callback", queryParam = "callback")
@Produces({ MediaType.APPLICATION_JSON,
MediaTypeAdditional.APPLICATION_JAVASCRIPT })
@CacheControl(mustRevalidate = true, noCache = true, noStore = true)
public Id getIdAsJSON(
@HeaderParam(HttpHeaders.USER_AGENT) final String agent) {
return new Id(getId(agent));
}
代码示例来源:origin: smoketurner/notification
@GET
@JSONP
@Timed
@Path("/{username}")
内容来源于网络,如有侵权,请联系作者删除!