org.atmosphere.samples.rest.counter
Class RestLongPolling

java.lang.Object
  extended by org.atmosphere.samples.rest.counter.RestLongPolling

@Singleton
public class RestLongPolling
extends Object

Simple application that demonstrate how a Comet long poll request can be implemented. Mainly, the client send a GET, the AtmosphereHandler suspend the connection. As soon a POST request arrive, the underlying response is resumed.

Author:
jeanfrancoisarcand

Constructor Summary
RestLongPolling()
           
 
Method Summary
 String increment(String count)
           
 String resume()
           
 String suspend()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestLongPolling

public RestLongPolling()
Method Detail

suspend

@Suspend
public String suspend()

increment

public String increment(String count)

resume

@Resume
public String resume()


Copyright © 2009 SUN Microsystems. All Rights Reserved.