Examples of addListener()


Examples of fr.soleil.salsa.entity.event.ScanAddOnModel.addListener()

    private void enableListening(IScanAddOns isao, boolean listen) {
        if (isao instanceof ScanAddOnModel) { // this test returns false if isao is null
            ScanAddOnModel saom = (ScanAddOnModel) isao;

            if (listen) {
                saom.addListener(listenerScanAddOn);
            }
            else {
                saom.removeListener(listenerScanAddOn);
            }
View Full Code Here

Examples of fr.soleil.salsa.entity.event.SensorModel.addListener()

            view.clearSensors();
            for (int i = 0; i < sensors.size(); i++) {

                ISensor s = sensors.get(i);
                SensorModel eSensort = (SensorModel) s;
                eSensort.addListener(sensorListener);
                view.addSensor(s.getName(), s.getName());
                if (i == postScanBehaviour.getSensor()) {
                    view.setSensorSelected(i);
                }
            }
View Full Code Here

Examples of fr.soleil.salsa.entity.event.Trajectory1DModel.addListener()

                rangeToAdd.getTrajectoriesList().add(trajectory1DModelToAdd);
                trajectory1DModelToAdd.setRange(rangeToAdd);
                trajectory1DModelToAdd.setActuator(actuatorModelsList.get(i));
                dimension.getTrajectoriesList().add(trajectory1DModelToAdd);
                trajectory1DModelToAdd.addListener(listenerTrajectory1D);
            }

            if (view != null) {
                view.addRange();
            }
View Full Code Here

Examples of games.pickupbot.Game.addListener()

    }

    public void testGatherPickupGame() {
        Game game = Game.tryParse(this.games[2]);

        game.addListener(new GameListener() {
            @Override
            public void pickupFormed(Game game) {
                assertTrue(game.getPlayerNicknames()[0].startsWith("testPlayerNick1"));
                assertTrue(game.getPlayerNicknames()[1].startsWith("testPlayerNick2"));
            }
View Full Code Here

Examples of hudson.remoting.Channel.addListener()

        final TaskListener taskListener = new StreamTaskListener(launchLog);
        PrintStream log = taskListener.getLogger();

        Channel channel = new Channel(nodeName,threadPoolForRemoting, Channel.Mode.NEGOTIATE,
            in,out, launchLog);
        channel.addListener(new Channel.Listener() {
            @Override
            public void onClosed(Channel c, IOException cause) {
                SlaveComputer.this.channel = null;
                // Orderly shutdown will have null exception
                if (cause!=null) {
View Full Code Here

Examples of io.fabric8.agent.download.DownloadFuture.addListener()

        config.setSettings(new MavenSettingsImpl(config.getSettingsFileUrl(), config.useFallbackRepositories()));
        DownloadManager dm = new DownloadManager(config, Executors.newSingleThreadExecutor());

        final CountDownLatch latch = new CountDownLatch(1);
        final DownloadFuture df = dm.download(String.format("mvn:%s/%s/%s", archetype.groupId, archetype.artifactId, archetype.version));
        df.addListener(new FutureListener<DownloadFuture>() {
            @Override
            public void operationComplete(DownloadFuture future) {
                latch.countDown();
            }
        });
View Full Code Here

Examples of io.netty.channel.ChannelFuture.addListener()

              lastWriteFuture = context.write(expiredToken);
            }

            if (feedbackServer.closeWhenDone) {
              if (lastWriteFuture != null) {
                lastWriteFuture.addListener(ChannelFutureListener.CLOSE);
              } else {
                context.close();
              }
            }
View Full Code Here

Examples of io.netty.channel.ChannelPromise.addListener()

    }

    private void shutdown(final CompletableFuture<Void> future) {
        channel.writeAndFlush(new CloseWebSocketFrame());
        final ChannelPromise promise = channel.newPromise();
        promise.addListener(f -> {
            if (f.cause() != null)
                future.completeExceptionally(f.cause());
            else
                future.complete(null);
        });
View Full Code Here

Examples of io.netty.channel.group.ChannelGroupFuture.addListener()

    vertx.setContext(closeContext);

    metrics.close();

    ChannelGroupFuture fut = serverChannelGroup.close();
    fut.addListener(cgf -> executeCloseDone(closeContext, done, fut.cause()));
  }

  private void executeCloseDone(final ContextImpl closeContext, final Handler<AsyncResult<Void>> done, final Exception e) {
    if (done != null) {
      closeContext.runOnContext((v) -> done.handle(Future.completedFuture(e)));
View Full Code Here

Examples of io.netty.util.concurrent.Future.addListener()

                removeListener(channel, listener);
            }
        }

        Future future = conn.unsubscribe(channel);
        future.addListener(new FutureListener() {
            @Override
            public void operationComplete(Future future) throws Exception {
                subscribedChannelsAmount.release();
            }
        });
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.