コード例 #1
0
  /**
   * Formats statistics in <tt>ColibriStatsExtension</tt> object
   *
   * @param statistics the statistics instance
   * @return the <tt>ColibriStatsExtension</tt> instance.
   */
  public static ColibriStatsExtension toXMPP(Statistics statistics) {
    ColibriStatsExtension ext = new ColibriStatsExtension();

    for (Map.Entry<String, Object> e : statistics.getStats().entrySet()) {
      ext.addStat(new ColibriStatsExtension.Stat(e.getKey(), e.getValue()));
    }
    return ext;
  }
コード例 #2
0
  /** {@inheritDoc} */
  @Override
  public String toString() {
    StringBuilder s = new StringBuilder();

    for (Map.Entry<String, Object> e : getStats().entrySet()) {
      s.append(e.getKey()).append(":").append(e.getValue()).append("\n");
    }
    return s.toString();
  }
コード例 #3
0
  /**
   * Adds the channel-bundles of this <tt>Conference</tt> as
   * <tt>ColibriConferenceIQ.ChannelBundle</tt> instances in <tt>iq</tt>.
   *
   * @param iq the <tt>ColibriConferenceIQ</tt> in which to describe.
   */
  void describeChannelBundles(ColibriConferenceIQ iq) {
    synchronized (transportManagers) {
      for (Map.Entry<String, IceUdpTransportManager> entry : transportManagers.entrySet()) {
        ColibriConferenceIQ.ChannelBundle responseBundleIQ =
            new ColibriConferenceIQ.ChannelBundle(entry.getKey());

        entry.getValue().describe(responseBundleIQ);
        iq.addChannelBundle(responseBundleIQ);
      }
    }
  }