org.glassfish.jersey.examples.server.async.managed
Class ChatResource
java.lang.Object
org.glassfish.jersey.examples.server.async.managed.ChatResource
@Path(value="chat")
@Produces(value="application/json")
public class ChatResource
- 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 (marek.potociar at oracle.com)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChatResource
public ChatResource()
getMessage
@GET
@ManagedAsync
public void getMessage(@Suspended
javax.ws.rs.container.AsyncResponse ar)
throws InterruptedException
- Throws:
InterruptedException
postMessage
@POST
@ManagedAsync
public String postMessage(Message message)
throws InterruptedException
- Throws:
InterruptedException
Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.