Class BlockingPostChatResource


  • @Path("async/messaging/blocking")
    @Produces("text/plain")
    @Consumes("text/plain")
    public class BlockingPostChatResource
    extends Object
    Example of a simple blocking point-to-point messaging resource. This version of the messaging resource blocks when POSTing a new message until the message is retrieved.
    Author:
    Marek Potociar
    • Constructor Detail

      • BlockingPostChatResource

        public BlockingPostChatResource()
    • Method Detail

      • pickUpMessage

        @GET
        public void pickUpMessage​(@Suspended
                                  jakarta.ws.rs.container.AsyncResponse ar,
                                  @QueryParam("id")
                                  String messageId)
      • postMessage

        @POST
        public void postMessage​(@Suspended
                                jakarta.ws.rs.container.AsyncResponse ar,
                                String message)