Class ChatResource
- java.lang.Object
-
- org.glassfish.jersey.examples.server.async.managed.ChatResource
-
@Path("chat") @Produces("application/json") public class ChatResource extends ObjectExample 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
-
-
Constructor Summary
Constructors Constructor Description ChatResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgetMessage(jakarta.ws.rs.container.AsyncResponse ar)StringpostMessage(Message message)
-
-
-
Method Detail
-
getMessage
@GET @ManagedAsync public void getMessage(@Suspended jakarta.ws.rs.container.AsyncResponse ar) throws InterruptedException- Throws:
InterruptedException
-
postMessage
@POST @ManagedAsync public String postMessage(Message message) throws InterruptedException
- Throws:
InterruptedException
-
-