Exemplo n.º 1
0
 private JitsiMeetConference getConferenceForMucJid(String mucJid) {
   String roomName = MucUtil.extractRoomNameFromMucJid(mucJid);
   if (roomName == null) {
     return null;
   }
   return focusManager.getConference(roomName);
 }
Exemplo 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;
   }
 }
Exemplo 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);
  }
Exemplo n.º 4
0
  /** Initializes this instance and bind packet listeners. */
  public void init() {
    this.smackXmpp = focusManager.getOperationSet(OperationSetDirectSmackXmpp.class);

    smackXmpp.addPacketHandler(this, this);
  }