org.glassfish.jersey.examples.server.async
Class FireAndForgetChatResource

java.lang.Object
  extended by org.glassfish.jersey.examples.server.async.FireAndForgetChatResource

@Path(value="async/messaging/fireAndForget")
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 (marek.potociar at oracle.com)

Field Summary
static String POST_NOTIFICATION_RESPONSE
           
 
Constructor Summary
FireAndForgetChatResource()
           
 
Method Summary
 void pickUpMessage(String messageId)
           
 String postMessage(String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POST_NOTIFICATION_RESPONSE

public static final String POST_NOTIFICATION_RESPONSE
See Also:
Constant Field Values
Constructor Detail

FireAndForgetChatResource

public FireAndForgetChatResource()
Method Detail

pickUpMessage

@Suspend
public void pickUpMessage(String messageId)
                   throws InterruptedException
Throws:
InterruptedException

postMessage

public String postMessage(String message)
                   throws InterruptedException
Throws:
InterruptedException


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.