Examples of StatusListener


Examples of org.apache.logging.log4j.status.StatusListener

                }
            }
            final Iterator<StatusListener> iter = ((StatusLogger) LOGGER).getListeners();
            boolean found = false;
            while (iter.hasNext()) {
                final StatusListener listener = iter.next();
                if (listener instanceof StatusConsoleListener) {
                    found = true;
                    ((StatusConsoleListener) listener).setLevel(status);
                    if (!verbose) {
                        ((StatusConsoleListener) listener).setFilters(VERBOSE_CLASSES);
                    }
                }
            }
            if (!found && status != Level.OFF) {
                final StatusConsoleListener listener = new StatusConsoleListener(status, stream);
                if (!verbose) {
                    listener.setFilters(VERBOSE_CLASSES);
                }
                ((StatusLogger) LOGGER).registerListener(listener);
                for (final String msg : messages) {
                    LOGGER.error(msg);
                }
View Full Code Here

Examples of org.apache.logging.log4j.status.StatusListener

            }

            final Iterator<StatusListener> statusIter = ((StatusLogger) LOGGER).getListeners();
            boolean found = false;
            while (statusIter.hasNext()) {
                final StatusListener listener = statusIter.next();
                if (listener instanceof StatusConsoleListener) {
                    found = true;
                    ((StatusConsoleListener) listener).setLevel(status);
                    if (!verbose) {
                        ((StatusConsoleListener) listener).setFilters(VERBOSE_CLASSES);
                    }
                }
            }
            if (!found && status != Level.OFF) {
                final StatusConsoleListener listener = new StatusConsoleListener(status, stream);
                if (!verbose) {
                    listener.setFilters(VERBOSE_CLASSES);
                }
                ((StatusLogger) LOGGER).registerListener(listener);
                for (final String msg : messages) {
                    LOGGER.error(msg);
                }
View Full Code Here

Examples of org.openquark.cal.machine.StatusListener

       
        String workspaceFileName = "gemcutter.default.cws";
        BasicCALServices services = BasicCALServices.make(workspaceFileName);
       
        // A simple status listener which provides feedback with dots.
        StatusListener statusListener = new StatusListener() {

            private int nDotsInLine = 0;
            private static final int DOTS_PER_LINE = 120;
           
            public void setModuleStatus(StatusListener.Status.Module moduleStatus, ModuleName moduleName) {
View Full Code Here

Examples of org.openquark.cal.machine.StatusListener

     * Recompiles the changed modules in the workspace.
     * @return True if the operation completed successfully, false otherwise.
     */
    private boolean recompile() {
        CompilerMessageLogger logger = new MessageLogger();
        StatusListener recompileStatusListener = new StatusListener.StatusListenerAdapter() {
            @Override
            public void setModuleStatus(StatusListener.Status.Module moduleStatus, ModuleName moduleName) {
                if (moduleStatus == StatusListener.SM_LOADED) {
                    incrementProgressBar();
                }
View Full Code Here

Examples of org.openquark.cal.machine.StatusListener

     */
    private boolean compileWorkspace(boolean dirtyModulesOnly) {
       
        // Create a listener that just sets status messages.
        // We no longer want detailed compilation status messages in status bar - these go in the splash screen now
        StatusListener listener = new StatusListener.StatusListenerAdapter() {
            public void setEntityStatus(StatusListener.Status.Entity entityStatus, String entityName) {
               
            }
            public void setModuleStatus(StatusListener.Status.Module moduleStatus, ModuleName moduleName) {
                String resourceName = statusToPropertyKeyMap.get(moduleStatus);
View Full Code Here

Examples of org.openquark.samples.bam.MessageSource.StatusListener

    /**
     * Method makeStatusListener
     * 
     */
    private StatusListener makeStatusListener (final MonitorJob job) {
        return new StatusListener () {

            public void statusChanged (int newStatus) {
                String jobName = job.getJobDescription ().getMessageSourceDescription ()
                        .getName ();
               
View Full Code Here

Examples of org.pokenet.server.battle.mechanics.statuses.StatusListener

    synchronized (m_statuses) {
      int size = m_statuses.size();
      for (int i = 0; i < size; ++i) {
        StatusEffect j = m_statuses.get(i);
        if (j.isActive() && (j instanceof StatusListener)) {
          StatusListener k = (StatusListener) j;
          if (applied) {
            k.informStatusApplied(source, this, eff);
          } else {
            k.informStatusRemoved(this, eff);
          }
        }
      }
    }
  }
View Full Code Here

Examples of twitter4j.StatusListener

      .setOAuthConsumerSecret("************")
      .setOAuthAccessToken("*******************")
      .setOAuthAccessTokenSecret("****************");
    TwitterStream twitterStream = new TwitterStreamFactory(cb.build()).getInstance();
        TwitterDownloader td = new TwitterDownloader();
        StatusListener listener = td.makeListener(twitterStream);
        twitterStream.addListener(listener);
        twitterStream.sample();
  }
View Full Code Here

Examples of twitter4j.StatusListener

  public void open(Map conf, TopologyContext context,
      SpoutOutputCollector collector) {
    queue = new LinkedBlockingQueue<Status>(1000);
    _collector = collector;

    StatusListener listener = new StatusListener() {

      @Override
      public void onStatus(Status status) {
     
        queue.offer(status);
View Full Code Here

Examples of twitter4j.StatusListener

        log.info("Cleanup_twitter_stream");
      }
    }; // ConnectionLifeCycleListener

    final TwitterStream twitterStream;
    final StatusListener statusListener;
    final int QUEUE_SIZE = 2000;
    /** This queue is used to move twitter events from the twitter4j thread to the druid ingest thread.   */
    final BlockingQueue<Status> queue = new ArrayBlockingQueue<Status>(QUEUE_SIZE);
    final LinkedList<String> dimensions = new LinkedList<String>();
    final long startMsec = System.currentTimeMillis();

    dimensions.add("htags");
    dimensions.add("lang");
    dimensions.add("utc_offset");

    //
    //   set up Twitter Spritzer
    //
    twitterStream = new TwitterStreamFactory().getInstance();
    twitterStream.addConnectionLifeCycleListener(connectionLifeCycleListener);
    statusListener = new StatusListener() {  // This is what really gets called to deliver stuff from twitter4j
      @Override
      public void onStatus(Status status)
      {
        // time to stop?
        if (Thread.currentThread().isInterrupted()) {
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.