equal
deleted
inserted
replaced
52 * - dispatch mechanism |
52 * - dispatch mechanism |
53 * - error handling |
53 * - error handling |
54 * - security |
54 * - security |
55 * |
55 * |
56 */ |
56 */ |
57 public abstract class AbstractEventStream implements EventStream { |
57 abstract class AbstractEventStream implements EventStream { |
58 private final static AtomicLong counter = new AtomicLong(1); |
58 private final static AtomicLong counter = new AtomicLong(1); |
59 |
59 |
60 private final Object terminated = new Object(); |
60 private final Object terminated = new Object(); |
61 private final boolean active; |
61 private final boolean active; |
62 private final Runnable flushOperation = () -> dispatcher().runFlushActions(); |
62 private final Runnable flushOperation = () -> dispatcher().runFlushActions(); |
66 private volatile Thread thread; |
66 private volatile Thread thread; |
67 private Dispatcher dispatcher; |
67 private Dispatcher dispatcher; |
68 |
68 |
69 private volatile boolean closed; |
69 private volatile boolean closed; |
70 |
70 |
71 public AbstractEventStream(AccessControlContext acc, boolean active) throws IOException { |
71 AbstractEventStream(AccessControlContext acc, boolean active) throws IOException { |
72 this.accessControllerContext = Objects.requireNonNull(acc); |
72 this.accessControllerContext = Objects.requireNonNull(acc); |
73 this.active = active; |
73 this.active = active; |
74 } |
74 } |
75 |
75 |
76 @Override |
76 @Override |