Examples of EventIterator


Examples of javax.jcr.observation.EventIterator

                }

                // otherwise convert the remote events into an EventIterator
                // and the listener is called
                RemoteEventCollection.RemoteEvent[] remoteEvents = remoteEvent.getEvents();
                EventIterator events = toEvents(remoteEvents);
                try {
                    listener.onEvent(events);
                } catch (Exception e) {
                    log.error("Unexpected failure of Listener " + listener, e);
                }
View Full Code Here

Examples of javax.jcr.observation.EventIterator

        // only deliver if session is still live
        if (!session.isLive()) {
            return;
        }
        // check if filtered iterator has at least one event
        EventIterator it = new FilteredEventIterator(
                session, events.iterator(), events.getTimestamp(),
                events.getUserData(), filter, denied, false);
        if (it.hasNext()) {
            long time = System.currentTimeMillis();
            listener.onEvent(it);
            time = System.currentTimeMillis() - time;
            if (log.isDebugEnabled()) {
                log.debug("listener {} processed events in {} ms.",
View Full Code Here

Examples of javax.jcr.observation.EventIterator

                }

                // otherwise convert the remote events into an EventIterator
                // and the listener is called
                RemoteEventCollection.RemoteEvent[] remoteEvents = remoteEvent.getEvents();
                EventIterator events = toEvents(remoteEvents);
                try {
                    listener.onEvent(events);
                } catch (Exception e) {
                    log.error("Unexpected failure of Listener " + listener, e);
                }
View Full Code Here

Examples of javax.jcr.observation.EventIterator

                }

                // otherwise convert the remote events into an EventIterator
                // and the listener is called
                RemoteEventCollection.RemoteEvent[] remoteEvents = remoteEvent.getEvents();
                EventIterator events = toEvents(remoteEvents);
                try {
                    listener.onEvent(events);
                } catch (Exception e) {
                    log.error("Unexpected failure of Listener " + listener, e);
                }
View Full Code Here

Examples of javax.jcr.observation.EventIterator

        assertNotNull(exchange);

        Message message = exchange.getIn();
        assertNotNull(message);
        assertTrue(message instanceof JcrMessage);
        EventIterator eventIterator = ((JcrMessage)message).getEventIterator();
        assertNotNull(eventIterator);
        assertEquals(1, eventIterator.getSize());

        List<?> eventList = message.getBody(List.class);
        assertEquals(1, eventList.size());
        Event event = (Event) eventList.get(0);
        assertEquals(Event.NODE_ADDED, event.getType());
View Full Code Here

Examples of javax.jcr.observation.EventIterator

        // only deliver if session is still live
        if (!session.isLive()) {
            return;
        }
        // check if filtered iterator has at least one event
        EventIterator it = new FilteredEventIterator(events, filter, denied);
        if (it.hasNext()) {
            listener.onEvent(it);
        } else {
            // otherwise skip this listener
        }
    }
View Full Code Here

Examples of javax.jcr.observation.EventIterator

        EventResult listener = new EventResult(log);
        addEventListener(listener, Event.NODE_ADDED);
        testRootNode.addNode(nodeName1, testNodeType);
        testRootNode.save();
        removeEventListener(listener);
        EventIterator events = listener.getEventIterator(DEFAULT_WAIT_TIMEOUT);
        assertNotNull("No events delivered within " + DEFAULT_WAIT_TIMEOUT + "ms.", events);
        long size = events.getSize();
        if (size == -1) {
            throw new NotExecutableException("EventIterator.getSize() returns unavailable size.");
        }
        assertEquals("Wrong number of events", 1, size);
    }
View Full Code Here

Examples of net.sf.saxon.evpull.EventIterator

        }
        Configuration config = dynamicEnv.getConfiguration();
        try {
            Controller controller = newController();
            //initializeController(dynamicEnv, controller);
            EventIterator iter = iterateEvents(controller, dynamicEnv);
            //iter = new Decomposer(iter, config);

            Properties actualProperties = validateOutputProperties(controller, outputProperties);
            SerializerFactory sf = config.getSerializerFactory();
            PipelineConfiguration pipe = config.makePipelineConfiguration();
View Full Code Here

Examples of net.sf.saxon.evpull.EventIterator

        context.openStackFrame(stackFrameMap);

        final Configuration config = executable.getConfiguration();

        EventIterator ei = expression.iterateEvents(context);
        //ei = new TracingEventIterator(EventStackIterator.flatten(ei));
        return new ComplexContentProcessor(config, ei);
    }
View Full Code Here

Examples of net.sf.saxon.evpull.EventIterator

            throw new XPathException("XInclude processing is not supported with a pull parser");
        }
        receiver = makeValidator(receiver, source.getSystemId(), options);

        receiver.open();
        EventIterator provider = source.getEventIterator();
        if (provider instanceof LocationProvider) {
            pipe.setLocationProvider((LocationProvider)provider);
        }
        receiver.setPipelineConfiguration(pipe);
        SequenceReceiver out = receiver instanceof SequenceReceiver
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.