Examples of addListener()


Examples of net.grinder.AgentDaemon.addListener()

  @Test(timeout = 3000)
  public void testIfAgentDeadWellWhenConsoleIsShutdown() {
    // After connecting agent daemon,
    AgentDaemon agent = new AgentDaemon(agentConfig1);
    agent.run(console1.getConsolePort());
    agent.addListener(new AgentShutDownSynchronizeListener(condition));
    // Shutdown console
    console1.shutdown();
    waitOnCondition(condition, 2100);
  }
View Full Code Here

Examples of net.grinder.console.distribution.AgentCacheState.addListener()

   */
  public void distributeFiles(ListenerSupport<FileDistributionListener> listener, final boolean safe) {
    final FileDistribution fileDistribution = getConsoleComponent(FileDistribution.class);
    final AgentCacheState agentCacheState = fileDistribution.getAgentCacheState();
    final Condition cacheStateCondition = new Condition();
    agentCacheState.addListener(new PropertyChangeListener() {
      public void propertyChange(PropertyChangeEvent ignored) {
        synchronized (cacheStateCondition) {
          cacheStateCondition.notifyAll();
        }
      }
View Full Code Here

Examples of net.hasor.core.EventContext.addListener()

        EventContext ec = appContext.getEnvironment().getEventContext();
        //
        final String EventName = "MyEvent";//事件链的终端
        final String SeedEvent = "SeedEvent";//种子事件
        //1.添加事件监听器F
        ec.addListener(EventName, new MyListener());
        ec.addListener(SeedEvent, new EventListener() {
            public void onEvent(String event, Object[] params) throws Throwable {
                AppContext app = (AppContext) params[0];
                EventContext localEC = app.getEnvironment().getEventContext();
                System.out.println("before MyEvent.");
View Full Code Here

Examples of net.jini.lookup.LookupCache.addListener()

                                                                  context.getConfiguration());
        for(EventDescriptor eventDescriptor : context.getEventDescriptors()) {
            ServiceTemplate template = new ServiceTemplate(null, null, new Entry[]{eventDescriptor});
            LookupCache lCache = sdm.createLookupCache(template, null,  null);
            EventProducerManager eventProducerManager = new EventProducerManager(eventDescriptor, this, lCache);
            lCache.addListener(eventProducerManager);
            eventProducerManagers.add(eventProducerManager);
        }

    }
View Full Code Here

Examples of net.jxta.rendezvous.RendezVousService.addListener()

        JxtaStarter jxtaStarter = JxtaStarter.createInstance();
        jxtaStarter.startJxta(isServer);
        this.netPeerGroup = jxtaStarter.getNetPeerGroup();
        RendezVousService theRendezvous = jxtaStarter.getRendezvous();
        if(theRendezvous != null) {
            theRendezvous.addListener(this);
        }
    }
   
    /**
     *  This is the PipeListener interface. Expect a call to this method
View Full Code Here

Examples of net.laubenberger.bogatyr.view.swing.worker.Worker.addListener()

        return null;
      }
    };

    worker.addListener(this);
    worker.execute();
  }

  void stop() {
    isRunning = false;
View Full Code Here

Examples of net.mygwt.ui.client.fx.FXStyle.addListener()

    }

    if (animate) {
      FXStyle fx = new FXStyle(getElement());
      fx.duration = animateDuration;
      fx.addListener(Events.EffectComplete, new Listener() {
        public void handleEvent(BaseEvent be) {
          afterHide();
        }
      });
      fx.fadeOut();
View Full Code Here

Examples of net.mygwt.ui.client.widget.SplitBar.addListener()

      bar = new SplitBar(region, widget);
      bar.minSize = data.minimumSize;
      bar.maxSize = data.maximumSize == 0 ? bar.maxSize : data.maximumSize;
      bar.barWidth = 6;
      bar.autoSize = false;
      bar.addListener(Events.Resize, new Listener() {
        public void handleEvent(BaseEvent be) {
          if (be.size < 1) {
            return;
          }
          if (data.size < 1.1) {
View Full Code Here

Examples of net.rim.blackberry.api.messagelist.ApplicationMessageFolder.addListener()

    ReadableListImpl inboxMessages = messages.getInboxMessages();
   
    ApplicationMessageFolder inbox = reg.registerFolder(CustomMessage.INBOX_FOLDER_ID, _folderName, inboxMessages);

    // Register as a listener for callback notifications
    inbox.addListener(this, ApplicationMessageFolderListener.MESSAGE_DELETED | ApplicationMessageFolderListener.MESSAGE_MARKED_OPENED
      | ApplicationMessageFolderListener.MESSAGE_MARKED_UNOPENED, appDescr);     

    // We've registered two folders, specify root folder name for the [View Folder] screen.
    reg.setRootFolderName(_folderName);     
View Full Code Here

Examples of net.rim.blackberry.api.pdap.BlackBerryPIMList.addListener()

                       _vec.addElement(callback);
                       _listenerHash.put(eventService, _vec);
                 }// end if (_listenerHash.get(eventService)==null)

                     BlackBerryPIMList eventList = (BlackBerryPIMList)PIM.getInstance().openPIMList(PIM.EVENT_LIST, PIM.READ_WRITE);
           eventList.addListener(new AptListener(eventService));
                     
            //          callback.invoke(null, new Object[] { "added listener" });
                                    
                                
               }// end of if (!eventService.equalsIgnoreCase("")){
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.