Class BlockingPostChatResource
- java.lang.Object
-
- org.glassfish.jersey.examples.server.async.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
-
-
Field Summary
Fields Modifier and Type Field Description static StringPOST_NOTIFICATION_RESPONSE
-
Constructor Summary
Constructors Constructor Description BlockingPostChatResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpickUpMessage(AsyncResponse ar, String messageId)voidpostMessage(AsyncResponse ar, String message)
-
-
-
Field Detail
-
POST_NOTIFICATION_RESPONSE
public static final String POST_NOTIFICATION_RESPONSE
- See Also:
- Constant Field Values
-
-
Method Detail
-
pickUpMessage
@GET public void pickUpMessage(@Suspended AsyncResponse ar, @QueryParam("id") String messageId)
-
postMessage
@POST public void postMessage(@Suspended AsyncResponse ar, String message)
-
-