コード例 #1
0
  /**
   * Create SessionReaper.
   *
   * @param modelFactory An <code>InternalModelFactory</code>.
   */
  public SessionReaper(final InternalModelFactory modelFactory) {
    super();
    this.latestExecutionTime = System.currentTimeMillis();
    this.logger = new Log4JWrapper(getClass());
    this.queueModel = modelFactory.getQueueModel();
    this.sessionModel = modelFactory.getSessionModel();

    setInterruptThreshold(sessionModel.getConfiguration());
    setTimeout(sessionModel.getConfiguration());
    setTimeoutMargin(sessionModel.getConfiguration());
  }
コード例 #2
0
 /**
  * Obtain the archive's model factory.
  *
  * @param archiveId An archive id <code>JabberId</code>.
  * @return An archive's <code>ClientModelFactory</code>.
  */
 InternalModelFactory getModelFactory() {
   if (null == modelFactory) {
     modelFactory = InternalModelFactory.getInstance(new Context(), environment, workspace);
   }
   return modelFactory;
 }