org.atmosphere.gwt.client.impl
Class OperaEventSourceCometTransport
java.lang.Object
org.atmosphere.gwt.client.impl.BaseCometTransport
org.atmosphere.gwt.client.impl.OperaEventSourceCometTransport
- All Implemented Interfaces:
- CometTransport
public class OperaEventSourceCometTransport
- extends BaseCometTransport
This class uses Opera's event-source element to stream events.
http://my.opera.com/WebApplications/blog/show.dml/438711
The main issue with Opera's implementation is that we can't detect connection events. To support this three event
listeners are setup: one "s" for string messages, one "o" for the GWT serialized object messages, and the other "c"
for connection events. The server sends the event "c" as soon as the connection is established and "d"
when the connection is terminated. A connection timer is setup to detect initial connection errors. To detect
subsequent connection failure it also sends a heart beat events "h" when no messages have been sent for a specified
heart beat interval.
- Author:
- Richard Zschech
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OperaEventSourceCometTransport
public OperaEventSourceCometTransport()
initiate
public void initiate(AtmosphereClient client,
AtmosphereListener listener)
- Specified by:
initiate in interface CometTransport- Overrides:
initiate in class BaseCometTransport
connect
public void connect(int connectionCount)
disconnect
public void disconnect()
- Specified by:
disconnect in interface CometTransport- Overrides:
disconnect in class BaseCometTransport
Copyright © 2012. All Rights Reserved.