@Override public void run(Selectable selectable) { Reactor reactor = selectable.getReactor(); selectable.terminate(); reactor.update(selectable); } };
@Override public void error() { if (error != null) { error.run(this); } }
public static Reactor reactor(Handler... handlers) throws IOException { Reactor reactor = Reactor.Factory.create(); for (Handler handler : handlers) { reactor.getHandler().add(handler); } return reactor; }
@Override public void onTimerTask(Event e) { this.reactor.schedule(this.delay, this.timerCallback); } }
public void run() throws HandlerException { //Codes_SRS_IOTHUBREACTOR_34_003: [This function shall set the timeout of the reactor to 10 milliseconds.] this.reactor.setTimeout(10); this.reactor.start(); //Codes_SRS_IOTHUBREACTOR_34_004: [This function shall start the reactor and have it process indefinitely and stop the reactor when it finishes.] while(this.reactor.process()){} this.reactor.stop(); this.reactor.process(); this.reactor.free(); } }
@Override public void run(Selectable selectable) { Reactor reactor = selectable.getReactor(); selectable.terminate(); reactor.update(selectable); } };
public static Reactor reactor(ReactorOptions options, Handler... handlers) throws IOException { Reactor reactor = Reactor.Factory.create(options); for (Handler handler : handlers) { reactor.getHandler().add(handler); } return reactor; } }
@Override public void expired() { if (expire != null) { expire.run(this); } }
@Override public void onTimerTask(Event e) { this.reactor.schedule(this.delay, this.timerCallback); } }
@Override public void free() { if (free != null) { free.run(this); } }
@Override public void release() { if (release != null) { release.run(this); } }
@Override public void writeable() { if (writable != null) { writable.run(this); } }
@Override public void readable() { if (readable != null) { readable.run(this); } }
@Override public void release() { if (release != null) { release.run(this); } }
@Override public void writeable() { if (writable != null) { writable.run(this); } }
@Override public void expired() { if (expire != null) { expire.run(this); } }
@Override public void error() { if (error != null) { error.run(this); } }
@Override public void readable() { if (readable != null) { readable.run(this); } }
@Override public void free() { if (free != null) { free.run(this); } }