org.atmosphere.samples.rest.counter
Class RestLongPolling
java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RestLongPolling
public RestLongPolling()
suspend
public String suspend()
- On GET, suspend the conneciton. On POST, resume the connection.
- Parameters:
event -
- Returns:
-
- Throws:
IOException
increment
@ResumeOnBroadcast
public String increment(String count)
Copyright © 2009 SUN Microsystems. All Rights Reserved.