Examples of MPDStandAloneMonitor


Examples of org.bff.javampd.monitor.MPDStandAloneMonitor

        config = playerConfigCache.get(playerId);
        if (config != null && config.instance == null) {
         
          MPD mpd = new MPD(config.host, config.port, config.password, CONNECTION_TIMEOUT);
         
            MPDStandAloneMonitor mpdStandAloneMonitor = new MPDStandAloneMonitor(mpd, 500);
              mpdStandAloneMonitor.addVolumeChangeListener(this);
              mpdStandAloneMonitor.addPlayerChangeListener(this);
              mpdStandAloneMonitor.addTrackPositionChangeListener(this);             
             
              final MpdBinding self = this; // 'this' glue for the inner anon instance
              mpdStandAloneMonitor.addOutputChangeListener(new OutputChangeListener() {
               
            @Override
            public void outputChanged(OutputChangeEvent e) {
              // We have to 'wrap' the OutputChangeEvent listener
              // callback and add the playerId so we know which
View Full Code Here

Examples of org.bff.javampd.monitor.MPDStandAloneMonitor

   * @param playerId the id of the player to disconnect from
   */
  private void disconnect(String playerId) {
        try {
      MpdPlayerConfig playerConfig = playerConfigCache.get(playerId);
      MPDStandAloneMonitor monitor = playerConfig.monitor;
      if (monitor != null) {
        monitor.stop();
      }
          MPD mpd = playerConfig.instance;
          if (mpd != null) {
            mpd.close();
          }
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.