當前位置: 首頁>>代碼示例>>Java>>正文


Java Type.REST_GET屬性代碼示例

本文整理匯總了Java中org.jacpfx.common.Type.REST_GET屬性的典型用法代碼示例。如果您正苦於以下問題:Java Type.REST_GET屬性的具體用法?Java Type.REST_GET怎麽用?Java Type.REST_GET使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.jacpfx.common.Type的用法示例。


在下文中一共展示了Type.REST_GET屬性的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: findAll

@Path("/findAll")
@OperationType(Type.REST_GET)
public void findAll(final Message message) {
    dicovery.service("/userCommentsService",
            onSuccessService(si -> si.operation("/fetchByArticleIdREST/:articleId",
                            onSuccessOp(op ->
                                            getArticlesAndUpdateCommentURL(op, message),
                                    fail -> message.reply(gson.toJson(repository.getAllArticles())))),
                    fail -> message.reply(gson.toJson(repository.getAllArticles()))));

}
 
開發者ID:amoAHCP,項目名稱:vertx-microservices-devoxx,代碼行數:11,代碼來源:ArticleService.java

示例2: findMax

@Path("/findMAX/:amount")
@OperationType(Type.REST_GET)
public void findMax(@PathParam("amount") final String amount, final Message message) {
    dicovery.service("/userCommentsService",
            onSuccessService(si -> si.operation("/fetchByArticleIdWS",
                            onSuccessOp(op ->
                                            updateURL(message, op.getUrl(), repository.getAllArticles(Integer.valueOf(amount))),
                                    fail -> message.reply(gson.toJson(repository.getAllArticles(Integer.valueOf(amount)))))),
                    fail -> message.reply(gson.toJson(repository.getAllArticles(Integer.valueOf(amount))))));

}
 
開發者ID:amoAHCP,項目名稱:vertx-microservices-devoxx,代碼行數:11,代碼來源:ArticleService.java

示例3: findComments

@Path("/comments/:articleId")
@OperationType(Type.REST_GET)
public void findComments(@PathParam("articleId") final String articleId, Message message) {

    dicovery.service("/userCommentsService",
            onSuccessService(si -> operation(articleId, message, si),
                    fail -> message.reply("/userCommentsService not available: " + fail.getMessage())));

}
 
開發者ID:amoAHCP,項目名稱:vertx-microservices-devoxx,代碼行數:9,代碼來源:ArticleService.java

示例4: findPage

@Path("/findPage/:page")
@OperationType(Type.REST_GET)
public void findPage(@PathParam("page") final String page, final Message message) {
    dicovery.service("/userCommentsService",
            onSuccessService(si -> si.operation("/fetchByArticleIdWS",
                            onSuccessOp(op -> complexPageReply(page, message, op),
                                    fail -> simplePageReply(page, message))),
                    fail -> simplePageReply(page, message)));

}
 
開發者ID:amoAHCP,項目名稱:vertx-microservices-devoxx,代碼行數:10,代碼來源:ArticleService.java

示例5: fetchAllUserCommentsREST

@Path("/fetchAllREST")
@OperationType(Type.REST_GET)
public void fetchAllUserCommentsREST(Message message) {
    findAll((value)-> message.reply(gson.toJson(value)));
}
 
開發者ID:amoAHCP,項目名稱:vertx-microservices-devoxx,代碼行數:5,代碼來源:UserCommentsService.java

示例6: fetchByArticleIdREST

@Path("/fetchByArticleIdREST/:articleId")
@OperationType(Type.REST_GET)
public void fetchByArticleIdREST(@PathParam("articleId") String articleId, Message message) {
    findById((value)-> message.reply(gson.toJson(value)),articleId);
}
 
開發者ID:amoAHCP,項目名稱:vertx-microservices-devoxx,代碼行數:5,代碼來源:UserCommentsService.java

示例7: testSimpleString

@Path("/testSimpleString")
@OperationType(Type.REST_GET)
@Consumes("application/json")
public void testSimpleString(String name, WSMessageReply reply) {
    reply.reply(name);
}
 
開發者ID:amoAHCP,項目名稱:vert.x-microservice,代碼行數:6,代碼來源:ServiceEntryPointTestQueryParam.java

示例8: testSimpleObjectBySerialisation

@Path("/testSimpleObjectBySerialisation")
@OperationType(Type.REST_GET)
public void testSimpleObjectBySerialisation(PersonOne p1, WSMessageReply reply) {
    reply.reply(p1.getName());
}
 
開發者ID:amoAHCP,項目名稱:vert.x-microservice,代碼行數:5,代碼來源:ServiceEntryPointTestQueryParam.java

示例9: wsEndpointThree

@Path("/wsEndpointThree")
@OperationType(Type.REST_GET)
public void wsEndpointThree(String name,Message reply) {


    System.out.println("wsEndpointThree-2: " + name + "   :::" + this);
}
 
開發者ID:amoAHCP,項目名稱:vert.x-microservice,代碼行數:7,代碼來源:ServiceDiscoveryServiceTests.java

示例10: wsEndpointFour

@Path("/wsServiceTwoFour")
@OperationType(Type.REST_GET)
public void wsEndpointFour(String name,Message reply) {


    System.out.println("wsServiceTwoFour-2: " + name + "   :::" + this);
}
 
開發者ID:amoAHCP,項目名稱:vert.x-microservice,代碼行數:7,代碼來源:ServiceDiscoveryServiceTests.java


注:本文中的org.jacpfx.common.Type.REST_GET屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。