| Constructor and Description |
|---|
ReactorImpl(ManagedContext context) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPollable(Pollable pollable,
LoopHandler handler)
Add a new Pollable to this Reactor.
|
void |
addTimer(long initialDelay,
int numIterations,
LoopHandler handler)
Add a new ReactorTimer to this Reactor.
|
void |
cancel(LoopHandler handler)
Cancel an existing Pollable or ReactorTimer and remove the corresponding
LoopHandler from executing.
|
void |
run() |
void |
start()
Start the reactor.
|
void |
stop()
Stop the reactor.
|
public ReactorImpl(ManagedContext context)
public void addPollable(Pollable pollable, LoopHandler handler)
ReactorThis method is not thread-safe, and should only be done from inside the LoopHandler when invoked by the Reactor on its own thread.
addPollable in interface Reactorpollable - The Pollable with the socket to pollhandler - The loop handlerpublic void addTimer(long initialDelay,
int numIterations,
LoopHandler handler)
ReactorThis method is not thread-safe, and should only be done from inside the LoopHandler when invoked by the Reactor on its own thread.
public void cancel(LoopHandler handler)
ReactorThis method is not thread-safe, and should only be done from inside the LoopHandler when invoked by the Reactor on its own thread.
public void start()
Reactorpublic void stop()
ReactorCopyright © 2019. All rights reserved.