Class FireAndForgetChatResource
- java.lang.Object
-
- org.glassfish.jersey.examples.server.async.FireAndForgetChatResource
-
@Path("async/messaging/fireAndForget") @Produces("text/plain") @Consumes("text/plain") public class FireAndForgetChatResource extends Object
Example of a simple fire&forget point-to-point messaging resource. This version of the messaging resource does not block when POSTing a new message.- Author:
- Marek Potociar
-
-
Field Summary
Fields Modifier and Type Field Description static StringPOST_NOTIFICATION_RESPONSE
-
Constructor Summary
Constructors Constructor Description FireAndForgetChatResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpickUpMessage(AsyncResponse ar, String messageId)StringpostMessage(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) throws InterruptedException
- Throws:
InterruptedException
-
postMessage
@POST public String postMessage(String message) throws InterruptedException
- Throws:
InterruptedException
-
-