本文整理匯總了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);
}
示例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);
}
示例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);
}
示例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");
});
}
示例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);
}
示例6: fetchAllUserCommentsWS
@Path("/fetchAllWS")
@OperationType(Type.WEBSOCKET)
@Produces("application/json")
public void fetchAllUserCommentsWS(String message, WSMessageReply reply) {
findAll((value)-> reply.reply(gson.toJson(value)));
}
示例7: fetchByArticleIdWS
@Path("/fetchByArticleIdWS")
@OperationType(Type.WEBSOCKET)
public void fetchByArticleIdWS(String articleId, WSMessageReply reply) {
findById((value)-> reply.reply(gson.toJson(value)),articleId);
}
示例8: wsEndpointOne
@Path("/wsEndpintOne")
@OperationType(Type.WEBSOCKET)
public void wsEndpointOne(String name, WSMessageReply reply) {
}
示例9: testSimpleObjectBySerialisation
@Path("/testSimpleObjectBySerialisation")
@OperationType(Type.WEBSOCKET)
public void testSimpleObjectBySerialisation(PersonOne p1, WSMessageReply reply) {
reply.reply(p1.getName());
}
示例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);
}
示例11: wsEndpointOne
@Path("/wsEndpointOne")
@OperationType(Type.WEBSOCKET)
public void wsEndpointOne(String name, WSMessageReply reply) {
}
示例12: testSimpleString
@Path("/testSimpleString")
@OperationType(Type.WEBSOCKET)
@Consumes("application/json")
public void testSimpleString(String name, WSMessageReply reply) {
reply.reply(name);
}
示例13: testSimpleObjectByJSONSerialisation
@Path("/testSimpleObjectByJSONSerialisation")
@OperationType(Type.WEBSOCKET)
@Consumes("application/json")
public void testSimpleObjectByJSONSerialisation(PersonOne p1, WSMessageReply reply) {
reply.reply(p1.getName());
}
示例14: wsEndpointTwo
@Path("/wsEndpointTwo")
@OperationType(Type.WEBSOCKET)
public void wsEndpointTwo(String name, WSMessageReply reply) {
System.out.println("wsEndpointTwo-2: " + name + " :::" + this);
}