/** * 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()); }
/** * 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; }