org.glassfish.jersey.examples.server.async.managed
Class ChatResource
java.lang.Object
org.glassfish.jersey.examples.server.async.managed.ChatResource
@Path(value="chat")
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
@ManagedAsync
public void getMessage(@Suspended
AsyncResponse ar)
throws InterruptedException
- Throws:
InterruptedException
postMessage
@ManagedAsync
public String postMessage(Message message)
throws InterruptedException
- Throws:
InterruptedException
Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.