Esempio n. 1
0
 private JitsiMeetConference getConferenceForMucJid(String mucJid) {
   String roomName = MucUtil.extractRoomNameFromMucJid(mucJid);
   if (roomName == null) {
     return null;
   }
   return focusManager.getConference(roomName);
 }
Esempio n. 2
0
 /** Stops this instance and all threads created by it. */
 public void stop() {
   if (focusManager != null) {
     focusManager.setFocusAllocationListener(null);
     focusManager = null;
   }
   if (confDurationGuard != null) {
     confDurationGuard.cancel();
     confDurationGuard = null;
   }
 }
Esempio n. 3
0
  /**
   * Initializes this instance and starts background tasks required by <tt>RESTReservations</tt> to
   * work properly.
   *
   * @param focusManager <tt>FocusManager</tt> instance that manages conference pool.
   */
  public void start(FocusManager focusManager) {
    if (this.focusManager != null) throw new IllegalStateException("already started");
    if (focusManager == null) throw new NullPointerException("focusManager");

    this.focusManager = focusManager;
    focusManager.setFocusAllocationListener(this);

    confDurationGuard = new Timer("ConferenceDuartionGuard");
    confDurationGuard.scheduleAtFixedRate(
        new ConferenceExpireTask(), EXPIRE_INTERVAL, EXPIRE_INTERVAL);
  }
Esempio n. 4
0
  /** Initializes this instance and bind packet listeners. */
  public void init() {
    this.smackXmpp = focusManager.getOperationSet(OperationSetDirectSmackXmpp.class);

    smackXmpp.addPacketHandler(this, this);
  }