Package org.eclipse.osgi.framework.eventmgr

Examples of org.eclipse.osgi.framework.eventmgr.CopyOnWriteIdentityMap$Snapshot$ValueIterator


    if (listener instanceof SynchronousBundleListener) {
      framework.checkAdminPermission(getBundle(), AdminPermission.LISTENER);
      synchronized (framework.bundleEventSync) {
        checkValid();
        if (bundleEventSync == null) {
          bundleEventSync = new CopyOnWriteIdentityMap();
          framework.bundleEventSync.put(this, this);
        }

        bundleEventSync.put(listener, listener);
      }
    } else {
      synchronized (framework.bundleEvent) {
        checkValid();
        if (bundleEvent == null) {
          bundleEvent = new CopyOnWriteIdentityMap();
          framework.bundleEvent.put(this, this);
        }

        bundleEvent.put(listener, listener);
      }
View Full Code Here


    }

    synchronized (framework.frameworkEvent) {
      checkValid();
      if (frameworkEvent == null) {
        frameworkEvent = new CopyOnWriteIdentityMap();
        framework.frameworkEvent.put(this, this);
      }

      frameworkEvent.put(listener, listener);
    }
View Full Code Here

        "RSA EndpointDescriptionLocator ThreadGroup"); //$NON-NLS-1$
    eventGroup.setDaemon(true);
    eventManager = new EventManager(
        "RSA EndpointDescriptionLocator Dispatcher", eventGroup); //$NON-NLS-1$
    eventQueue = new ListenerQueue(eventManager);
    CopyOnWriteIdentityMap listeners = new CopyOnWriteIdentityMap();
    listeners.put(this, this);
    eventQueue.queueListeners(listeners.entrySet(), new EventDispatcher() {
      public void dispatchEvent(Object eventListener,
          Object listenerObject, int eventAction, Object eventObject) {
        final String logMethodName = "dispatchEvent"; //$NON-NLS-1$
        // We now dispatch both EndpointListenerEvents
        if (eventObject instanceof EndpointListenerEvent) {
View Full Code Here

      SecurityManager sm = System.getSecurityManager();
      Permission perm = (sm == null) ? null : new TopicPermission(
          eventTopic, TopicPermission.SUBSCRIBE);

      CopyOnWriteIdentityMap listeners = new CopyOnWriteIdentityMap();
      Iterator iter = eventHandlerWrappers.iterator();
      while (iter.hasNext()) {
        EventHandlerWrapper wrapper = (EventHandlerWrapper) iter.next();
        listeners.put(wrapper, perm);
      }

      ListenerQueue listenerQueue = new ListenerQueue(currentManager);
      listenerQueue.queueListeners(listeners.entrySet(),
          eventHandlerTracker);
      if (isAsync) {
        listenerQueue.dispatchEventAsynchronous(0, event);
      } else {
        listenerQueue.dispatchEventSynchronous(0, event);
View Full Code Here

TOP

Related Classes of org.eclipse.osgi.framework.eventmgr.CopyOnWriteIdentityMap$Snapshot$ValueIterator

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.