Search in sources :

Example 21 with TimerListener

use of com.swiftmq.swiftlet.timer.event.TimerListener 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

TimerListener (com.swiftmq.swiftlet.timer.event.TimerListener)21 POTimer (com.swiftmq.impl.streams.processor.po.POTimer)3 ChallengeResponseFactory (com.swiftmq.auth.ChallengeResponseFactory)2 RequestHandler (com.swiftmq.impl.routing.single.smqpr.RequestHandler)2 StartStageRequest (com.swiftmq.impl.routing.single.smqpr.StartStageRequest)2 Request (com.swiftmq.tools.requestreply.Request)2 DataStreamOutputStream (com.swiftmq.tools.util.DataStreamOutputStream)2 Milliseconds (com.swiftmq.amqp.v100.generated.transport.definitions.Milliseconds)1 AuthReplyRequest (com.swiftmq.impl.routing.single.smqpr.v400.AuthReplyRequest)1 AuthRequest (com.swiftmq.impl.routing.single.smqpr.v400.AuthRequest)1 ConnectReplyRequest (com.swiftmq.impl.routing.single.smqpr.v400.ConnectReplyRequest)1 AuthReplyRequest (com.swiftmq.impl.routing.single.smqpr.v942.AuthReplyRequest)1 AuthRequest (com.swiftmq.impl.routing.single.smqpr.v942.AuthRequest)1 ConnectReplyRequest (com.swiftmq.impl.routing.single.smqpr.v942.ConnectReplyRequest)1 MessageImpl (com.swiftmq.jms.MessageImpl)1 Entity (com.swiftmq.mgmt.Entity)1 IOException (java.io.IOException)1 MalformedURLException (java.net.MalformedURLException)1 JMSException (javax.jms.JMSException)1