Search in sources :

Example 1 with ManagementInput

use of com.swiftmq.impl.streams.comp.io.ManagementInput in project swiftmq-ce by iitsoftware.

the class StreamProcessor method visit.

@Override
public void visit(POMgmtMessage po) {
    if (ctx.ctx.traceSpace.enabled)
        ctx.ctx.traceSpace.trace(ctx.ctx.streamsSwiftlet.getName(), toString() + "/visit, po=" + po + " ...");
    po.setSuccess(true);
    msgsProcessed++;
    try {
        ManagementInput input = po.getManagementProcessor().getInput();
        Message message = po.getMessage();
        input.current(message).executeCallback();
        if (message.isOnMessageEnabled()) {
            long start = System.nanoTime();
            ctx.stream.current(input.current()).executeOnMessageCallback();
            timeOnMessage = (int) (System.nanoTime() - start) / 1000;
        }
        ctx.commitTransactions();
    } catch (Exception e) {
        handleException(po, e);
    }
    if (po.getSemaphore() != null)
        po.getSemaphore().notifySingleWaiter();
    if (ctx.ctx.traceSpace.enabled)
        ctx.ctx.traceSpace.trace(ctx.ctx.streamsSwiftlet.getName(), toString() + "/visit, po=" + po + " done");
}
Also used : ManagementInput(com.swiftmq.impl.streams.comp.io.ManagementInput) Message(com.swiftmq.impl.streams.comp.message.Message)

Aggregations

ManagementInput (com.swiftmq.impl.streams.comp.io.ManagementInput)1 Message (com.swiftmq.impl.streams.comp.message.Message)1