Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.EventFilter


    public HierarchyEventListener(WorkspaceManager wspManager,
                                  HierarchyManager hierarchyMgr,
                                  CacheBehaviour cacheBehaviour) {
        this.hierarchyMgr = hierarchyMgr;
        if (cacheBehaviour == CacheBehaviour.OBSERVATION) {
            EventFilter filter = null;
            try {
                // listen to all events except 'local' ones
                Path root = wspManager.getPathFactory().getRootPath();
                filter = wspManager.createEventFilter(Event.ALL_TYPES, root, true, null, null, true);
            } catch (RepositoryException e) {
View Full Code Here


    public HierarchyEventListener(WorkspaceManager wspManager,
                                  HierarchyManager hierarchyMgr,
                                  CacheBehaviour cacheBehaviour) {
        this.hierarchyMgr = hierarchyMgr;
        if (cacheBehaviour == CacheBehaviour.OBSERVATION) {
            EventFilter filter = null;
            try {
                // listen to all events except 'local' ones
                Path root = wspManager.getPathFactory().getRootPath();
                filter = wspManager.createEventFilter(Event.ALL_TYPES, root, true, null, null, true);
            } catch (RepositoryException e) {
View Full Code Here

            } catch (NameException e) {
                throw new RepositoryException(e.getMessage());
            }
        }

        EventFilter filter = wspManager.createEventFilter(eventTypes, path, isDeep, uuids, qNodeTypeNames, noLocal);
        synchronized (subscriptions) {
            subscriptions.put(listener, filter);
            readOnlySubscriptions = null;
        }
View Full Code Here

            activeListeners = readOnlySubscriptions;
        }
        for (Iterator it = activeListeners.entrySet().iterator(); it.hasNext(); ) {
            Map.Entry entry = (Map.Entry) it.next();
            EventListener listener = (EventListener) entry.getKey();
            EventFilter filter = (EventFilter) entry.getValue();
            FilteredEventIterator eventIter = new FilteredEventIterator(eventBundle, filter, resolver, valueFactory, wspManager.getIdFactory());
            if (eventIter.hasNext()) {
                try {
                    listener.onEvent(eventIter);
                } catch (Throwable t) {
View Full Code Here

            } catch (NameException e) {
                throw new RepositoryException(e.getMessage());
            }
        }

        EventFilter filter = wspManager.createEventFilter(eventTypes, path, isDeep, uuids, qNodeTypeNames, noLocal);
        synchronized (subscriptions) {
            subscriptions.put(listener, filter);
            readOnlySubscriptions = null;
        }
View Full Code Here

            activeListeners = readOnlySubscriptions;
        }
        for (Iterator it = activeListeners.entrySet().iterator(); it.hasNext(); ) {
            Map.Entry entry = (Map.Entry) it.next();
            EventListener listener = (EventListener) entry.getKey();
            EventFilter filter = (EventFilter) entry.getValue();
            FilteredEventIterator eventIter = new FilteredEventIterator(eventBundle, filter, resolver);
            if (eventIter.hasNext()) {
                try {
                    listener.onEvent(eventIter);
                } catch (Throwable t) {
View Full Code Here

    public HierarchyEventListener(WorkspaceManager wspManager,
                                  HierarchyManager hierarchyMgr,
                                  CacheBehaviour cacheBehaviour) {
        this.hierarchyMgr = hierarchyMgr;
        if (cacheBehaviour == CacheBehaviour.OBSERVATION) {
            EventFilter filter = null;
            try {
                // listen to all events except 'local' ones
                Path root = wspManager.getPathFactory().getRootPath();
                filter = wspManager.createEventFilter(Event.ALL_TYPES, root, true, null, null, true);
            } catch (RepositoryException e) {
View Full Code Here

                                 String absPath,
                                 boolean isDeep,
                                 String[] uuids,
                                 String[] nodeTypeNames,
                                 boolean noLocal) throws RepositoryException {
        EventFilter filter = createEventFilter(eventTypes, absPath,
                isDeep, uuids, nodeTypeNames, noLocal);
        synchronized (subscriptions) {
            subscriptions.put(listener, filter);
            readOnlySubscriptions = null;
        }
View Full Code Here

     */
    public EventJournal getEventJournal(
            int eventTypes, String absPath, boolean isDeep,
            String[] uuid, String[] nodeTypeName)
            throws RepositoryException {
        EventFilter filter = createEventFilter(eventTypes, absPath, isDeep, uuid, nodeTypeName, false);
        return new EventJournalImpl(wspManager, filter, resolver);
    }
View Full Code Here

            ensureReadOnlyMap();
            activeListeners = readOnlySubscriptions;
        }
        for (Map.Entry<EventListener, EventFilter> entry : activeListeners.entrySet()) {
            EventListener listener = entry.getKey();
            EventFilter filter = entry.getValue();
            FilteredEventIterator eventIter = new FilteredEventIterator(
                    eventBundle.getEvents(), eventBundle.isLocal(), filter,
                    resolver, wspManager.getIdFactory());
            if (eventIter.hasNext()) {
                try {
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.spi.EventFilter

Copyright © 2018 www.massapicom. 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.