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

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

@Path(value="async/messaging/blocking")
@Produces(value="text/plain")
@Consumes(value="text/plain")
public class BlockingPostChatResource
extends Object

Example of a simple blocking point-to-point messaging resource. This version of the messaging resource blocks when POSTing a new message until the message is retrieved.

Author:
Marek Potociar (marek.potociar at oracle.com)

Field Summary
static String POST_NOTIFICATION_RESPONSE
           
 
Constructor Summary
BlockingPostChatResource()
           
 
Method Summary
 void pickUpMessage(AsyncResponse ar, String messageId)
           
 void postMessage(AsyncResponse ar, 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

BlockingPostChatResource

public BlockingPostChatResource()
Method Detail

pickUpMessage

@GET
public void pickUpMessage(@Suspended
                              AsyncResponse ar,
                              @QueryParam(value="id")
                              String messageId)

postMessage

@POST
public void postMessage(@Suspended
                             AsyncResponse ar,
                             String message)


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