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


Java Type.WEBSOCKET屬性代碼示例

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


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

示例1: wsEndpointTwo

@Path("/wsEndpintTwo")
@OperationType(Type.WEBSOCKET)
public void wsEndpointTwo(String name, WSMessageReply reply) {

    replyAsyncTwo(name + "-3", reply);
    replyAsyncTwo(name + "-4", reply);
    replyAsyncTwo(name + "-5", reply);
    replyAsyncTwo(name + "-6",reply);
    System.out.println("wsEndpointTwo-2: " + name + "   :::" + this);
}
 
開發者ID:amoAHCP,項目名稱:vert.x-microservice,代碼行數:10,代碼來源:WSClusteredServiceTest.java

示例2: wsEndpointHello

@Path("/hello")
@OperationType(Type.WEBSOCKET)
public void wsEndpointHello(String name, WSMessageReply reply) {

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

示例3: wsEndpointAsyncReply

@Path("/asyncReply")
@OperationType(Type.WEBSOCKET)
public void wsEndpointAsyncReply(String name, WSMessageReply reply) {

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

示例4: testSimpleString

@Path("/testSimpleTimerToAll")
@OperationType(Type.WEBSOCKET)
@Consumes("application/json")
public void testSimpleString(String name, WSMessageReply reply) {
    System.out.println("GOT MESSAGE");
    this.getVertx().setPeriodic(2000, (arg) -> {
        System.out.println("SEND MESSAGE");
        reply.replyToAllAsync(() -> "42");
    });
}
 
開發者ID:amoAHCP,項目名稱:vert.x-microservice,代碼行數:10,代碼來源:WSTimerTest.java

示例5: wsEndpointThreeReplyToAll

@Path("/wsEndpintThree")
@OperationType(Type.WEBSOCKET)
public void wsEndpointThreeReplyToAll(String name, WSMessageReply reply) {
    replyToAllAsync(name + "-3", reply);
    replyToAllAsync(name + "-4", reply);
    replyToAllAsync(name + "-5", reply);
    replyToAllAsync(name + "-6", reply);

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

示例6: fetchAllUserCommentsWS

@Path("/fetchAllWS")
@OperationType(Type.WEBSOCKET)
@Produces("application/json")
public void fetchAllUserCommentsWS(String message, WSMessageReply reply) {
    findAll((value)-> reply.reply(gson.toJson(value)));
}
 
開發者ID:amoAHCP,項目名稱:vertx-microservices-devoxx,代碼行數:6,代碼來源:UserCommentsService.java

示例7: fetchByArticleIdWS

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

示例8: wsEndpointOne

@Path("/wsEndpintOne")
@OperationType(Type.WEBSOCKET)
public void wsEndpointOne(String name, WSMessageReply reply) {

}
 
開發者ID:amoAHCP,項目名稱:vert.x-microservice,代碼行數:5,代碼來源:WSClusteredServiceTest.java

示例9: testSimpleObjectBySerialisation

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

示例10: wsEndpointThreeReplyToAllTwo

@Path("/wsEndpintFour")
@OperationType(Type.WEBSOCKET)
public void wsEndpointThreeReplyToAllTwo(String name, WSMessageReply reply) {
    replyToAllAsync(name + "-3", reply);
    System.out.println("wsEndpointThreeReplyToAllTwo-4: " + name + "   :::" + this);
}
 
開發者ID:amoAHCP,項目名稱:vert.x-microservice,代碼行數:6,代碼來源:WSClusteredServiceTest.java

示例11: wsEndpointOne

@Path("/wsEndpointOne")
@OperationType(Type.WEBSOCKET)
public void wsEndpointOne(String name, WSMessageReply reply) {

}
 
開發者ID:amoAHCP,項目名稱:vert.x-microservice,代碼行數:5,代碼來源:ServiceDiscoveryServiceTests.java

示例12: testSimpleString

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

示例13: testSimpleObjectByJSONSerialisation

@Path("/testSimpleObjectByJSONSerialisation")
@OperationType(Type.WEBSOCKET)
@Consumes("application/json")
public void testSimpleObjectByJSONSerialisation(PersonOne p1, WSMessageReply reply) {
    reply.reply(p1.getName());
}
 
開發者ID:amoAHCP,項目名稱:vert.x-microservice,代碼行數:6,代碼來源:WSConsumesTest.java

示例14: wsEndpointTwo

@Path("/wsEndpointTwo")
@OperationType(Type.WEBSOCKET)
public void wsEndpointTwo(String name, WSMessageReply reply) {


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


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