reta commented on a change in pull request #621: CXF-7996: TCK Fixes for SSE
reconnect state tests
URL: https://github.com/apache/cxf/pull/621#discussion_r363137022
##########
File path:
rt/rs/sse/src/main/java/org/apache/cxf/jaxrs/sse/client/SseEventSourceImpl.java
##########
@@ -44,65 +52,69 @@
import org.apache.cxf.jaxrs.utils.ExceptionUtils;
/**
- * SSE Event Source implementation
+ * SSE Event Source implementation
*/
public class SseEventSourceImpl implements SseEventSource {
private static final Logger LOG =
LogUtils.getL7dLogger(SseEventSourceImpl.class);
-
+
private final WebTarget target;
private final Collection<InboundSseEventListener> listeners = new
CopyOnWriteArrayList<>();
private final AtomicReference<SseSourceState> state = new
AtomicReference<>(SseSourceState.CLOSED);
-
+
// It may happen that open() and close() could be called on separate
threads
private volatile ScheduledExecutorService executor;
private volatile boolean managedExecutor = true;
- private volatile InboundSseEventProcessor processor;
- private volatile TimeUnit unit;
+ private volatile InboundSseEventProcessor processor;
+ // delay here is always in Milliseconds - conversion takes place in the
ctor
private volatile long delay;
+ // Indicates the this SseEventSource has been opened. It will remain true
even if this is moved back to the
+ // connecting state due to a scheduled reconnect.
+ private volatile boolean isOpened;
Review comment:
Minor, may be just `opened` would be OK?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services