Search in sources :

Example 1 with POTimer

use of com.swiftmq.impl.streams.processor.po.POTimer in project swiftmq-ce by iitsoftware.

the class AtTimer method start.

@Override
public void start() throws Exception {
    timerListener = new TimerListener() {

        @Override
        public void performTimeAction() {
            ctx.streamProcessor.dispatch(new POTimer(null, AtTimer.this));
        }
    };
    ctx.ctx.timerSwiftlet.addInstantTimerListener(calcNextStart(), timerListener);
    try {
        usage.getProperty("started").setValue(new Boolean(true));
    } catch (Exception e) {
        e.printStackTrace();
    }
}
Also used : POTimer(com.swiftmq.impl.streams.processor.po.POTimer) TimerListener(com.swiftmq.swiftlet.timer.event.TimerListener)

Example 2 with POTimer

use of com.swiftmq.impl.streams.processor.po.POTimer in project swiftmq-ce by iitsoftware.

the class IntervalTimer method start.

@Override
public void start() throws Exception {
    timerListener = new TimerListener() {

        @Override
        public void performTimeAction() {
            ctx.streamProcessor.dispatch(new POTimer(null, IntervalTimer.this));
        }
    };
    ctx.ctx.timerSwiftlet.addTimerListener(millis, timerListener);
    try {
        usage.getProperty("started").setValue(new Boolean(true));
    } catch (Exception e) {
        e.printStackTrace();
    }
}
Also used : POTimer(com.swiftmq.impl.streams.processor.po.POTimer) TimerListener(com.swiftmq.swiftlet.timer.event.TimerListener)

Example 3 with POTimer

use of com.swiftmq.impl.streams.processor.po.POTimer in project swiftmq-ce by iitsoftware.

the class NextTimer method start.

@Override
public void start() throws Exception {
    timerListener = new TimerListener() {

        @Override
        public void performTimeAction() {
            ctx.streamProcessor.dispatch(new POTimer(null, NextTimer.this));
        }
    };
    computeTime();
    ctx.ctx.timerSwiftlet.addInstantTimerListener(millis, timerListener);
    try {
        usage.getProperty("started").setValue(new Boolean(true));
    } catch (Exception e) {
        e.printStackTrace();
    }
}
Also used : POTimer(com.swiftmq.impl.streams.processor.po.POTimer) TimerListener(com.swiftmq.swiftlet.timer.event.TimerListener)

Aggregations

POTimer (com.swiftmq.impl.streams.processor.po.POTimer)3 TimerListener (com.swiftmq.swiftlet.timer.event.TimerListener)3