Examples of RemoteEventCollection


Examples of org.apache.jackrabbit.rmi.remote.RemoteEventCollection

     */
    public void run() {
        while (running && session.isLive()) {
            try {
                // ask for an event waiting at most POLL_TIMEOUT milliseconds
                RemoteEventCollection remoteEvent = remote.getNextEvent(POLL_TIMEOUT);

                // poll time out, check running and ask again
                if (remoteEvent == null) {
                    continue;
                }

                // extract the listener id from the remote event and find
                // the locally registered event listener
                Long id = new Long(remoteEvent.getListenerId());
                EventListener listener = (EventListener) listenerMap.get(id);

                // if the listener is not registered (anymore), the event is
                // silently ignored, running is checked and the server asked again
                if (listener == null) {
                    continue;
                }

                // 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 org.apache.jackrabbit.rmi.remote.RemoteEventCollection

     * @param events The {@link javax.jcr.observation.Event Events} to be
     *      dispatched.
     */
    public void onEvent(EventIterator events) {
        try {
            RemoteEventCollection remoteEvent = factory.getRemoteEvent(listenerId, events);
            queue.put(remoteEvent);
        } catch (RemoteException re) {
            Throwable t = (re.getCause() == null) ? re : re.getCause();
            log.error("Problem creating remote event for " + listenerId, t);
        }
View Full Code Here

Examples of org.apache.jackrabbit.rmi.remote.RemoteEventCollection

     * @param events The {@link javax.jcr.observation.Event Events} to be
     *      dispatched.
     */
    public void onEvent(EventIterator events) {
        try {
            RemoteEventCollection remoteEvent = factory.getRemoteEvent(listenerId, events);
            queue.put(remoteEvent);
        } catch (RemoteException re) {
            Throwable t = (re.getCause() == null) ? re : re.getCause();
            log.error("Problem creating remote event for " + listenerId, t);
        }
View Full Code Here

Examples of org.apache.jackrabbit.rmi.remote.RemoteEventCollection

     */
    public void run() {
        while (running && session.isLive()) {
            try {
                // ask for an event waiting at most POLL_TIMEOUT milliseconds
                RemoteEventCollection remoteEvent = remote.getNextEvent(POLL_TIMEOUT);

                // poll time out, check running and ask again
                if (remoteEvent == null) {
                    continue;
                }

                // extract the listener id from the remote event and find
                // the locally registered event listener
                Long id = new Long(remoteEvent.getListenerId());
                EventListener listener = (EventListener) listenerMap.get(id);

                // if the listener is not registered (anymore), the event is
                // silently ignored, running is checked and the server asked again
                if (listener == null) {
                    continue;
                }

                // 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 org.apache.jackrabbit.rmi.remote.RemoteEventCollection

     */
    public void run() {
        while (running && session.isLive()) {
            try {
                // ask for an event waiting at most POLL_TIMEOUT milliseconds
                RemoteEventCollection remoteEvent = remote.getNextEvent(POLL_TIMEOUT);

                // poll time out, check running and ask again
                if (remoteEvent == null) {
                    continue;
                }

                // extract the listener id from the remote event and find
                // the locally registered event listener
                Long id = new Long(remoteEvent.getListenerId());
                EventListener listener = (EventListener) listenerMap.get(id);

                // if the listener is not registered (anymore), the event is
                // silently ignored, running is checked and the server asked again
                if (listener == null) {
                    continue;
                }

                // 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 org.apache.jackrabbit.rmi.remote.RemoteEventCollection

     */
    public void run() {
        while (running && session.isLive()) {
            try {
                // ask for an event waiting at most POLL_TIMEOUT milliseconds
                RemoteEventCollection remoteEvent = remote.getNextEvent(POLL_TIMEOUT);

                // poll time out, check running and ask again
                if (remoteEvent == null) {
                    continue;
                }

                // extract the listener id from the remote event and find
                // the locally registered event listener
                Long id = new Long(remoteEvent.getListenerId());
                EventListener listener = (EventListener) listenerMap.get(id);

                // if the listener is not registered (anymore), the event is
                // silently ignored, running is checked and the server asked again
                if (listener == null) {
                    continue;
                }

                // 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 org.apache.jackrabbit.rmi.remote.RemoteEventCollection

     */
    public void run() {
        while (running && session.isLive()) {
            try {
                // ask for an event waiting at most POLL_TIMEOUT milliseconds
                RemoteEventCollection remoteEvent = remote.getNextEvent(POLL_TIMEOUT);

                // poll time out, check running and ask again
                if (remoteEvent == null) {
                    continue;
                }

                // extract the listener id from the remote event and find
                // the locally registered event listener
                Long id = new Long(remoteEvent.getListenerId());
                EventListener listener = (EventListener) listenerMap.get(id);

                // if the listener is not registered (anymore), the event is
                // silently ignored, running is checked and the server asked again
                if (listener == null) {
                    continue;
                }

                // 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 org.apache.jackrabbit.rmi.remote.RemoteEventCollection

     */
    public void run() {
        while (running && session.isLive()) {
            try {
                // ask for an event waiting at most POLL_TIMEOUT milliseconds
                RemoteEventCollection remoteEvent = remote.getNextEvent(POLL_TIMEOUT);

                // poll time out, check running and ask again
                if (remoteEvent == null) {
                    continue;
                }

                // extract the listener id from the remote event and find
                // the locally registered event listener
                Long id = new Long(remoteEvent.getListenerId());
                EventListener listener = (EventListener) listenerMap.get(id);

                // if the listener is not registered (anymore), the event is
                // silently ignored, running is checked and the server asked again
                if (listener == null) {
                    continue;
                }

                // 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 org.apache.jackrabbit.rmi.remote.RemoteEventCollection

     * @param events The {@link javax.jcr.observation.Event Events} to be
     *      dispatched.
     */
    public void onEvent(EventIterator events) {
        try {
            RemoteEventCollection remoteEvent = factory.getRemoteEvent(listenerId, events);
            queue.put(remoteEvent);
        } catch (RemoteException re) {
            Throwable t = (re.getCause() == null) ? re : re.getCause();
            log.error("Problem creating remote event for " + listenerId, t);
        }
View Full Code Here

Examples of org.apache.jackrabbit.rmi.remote.RemoteEventCollection

     */
    public void run() {
        while (running && session.isLive()) {
            try {
                // ask for an event waiting at most POLL_TIMEOUT milliseconds
                RemoteEventCollection remoteEvent = remote.getNextEvent(POLL_TIMEOUT);

                // poll time out, check running and ask again
                if (remoteEvent == null) {
                    continue;
                }

                // extract the listener id from the remote event and find
                // the locally registered event listener
                Long id = new Long(remoteEvent.getListenerId());
                EventListener listener = (EventListener) listenerMap.get(id);

                // if the listener is not registered (anymore), the event is
                // silently ignored, running is checked and the server asked again
                if (listener == null) {
                    continue;
                }

                // 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
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.