/** Constructs MessageSourceService. */ MessageSourceService(MessageHistoryServiceImpl messageHistoryService) { this.messageHistoryService = messageHistoryService; ConfigurationService conf = MessageHistoryActivator.getConfigurationService(); if (conf.getBoolean(IN_HISTORY_PROPERTY, false)) { sourceServiceType = HISTORY_TYPE; } MESSAGE_HISTORY_NAME = MessageHistoryActivator.getResources().getI18NString("service.gui.RECENT_MESSAGES"); numberOfMessages = conf.getInt(NUMBER_OF_RECENT_MSGS_PROP, numberOfMessages); isSMSEnabled = conf.getBoolean(IS_MESSAGE_SUBTYPE_SMS_PROP, isSMSEnabled); RECENT_MSGS_VER = conf.getString(VER_OF_RECENT_MSGS_PROP, RECENT_MSGS_VER); MessageSourceContactPresenceStatus.MSG_SRC_CONTACT_ONLINE.setStatusIcon( MessageHistoryActivator.getResources() .getImageInBytes("service.gui.icons.SMS_STATUS_ICON")); }
/** Starts this manager for given <tt>hostName</tt>. */ public void start() { expireThread.start(); ConfigurationService config = FocusBundleActivator.getConfigService(); String hostName = config.getString(HOSTNAME_PNAME); String xmppDomain = config.getString(XMPP_DOMAIN_PNAME); focusUserDomain = config.getString(FOCUS_USER_DOMAIN_PNAME); focusUserName = config.getString(FOCUS_USER_NAME_PNAME); String focusUserPassword = config.getString(FOCUS_USER_PASSWORD_PNAME); protocolProviderHandler.start(hostName, focusUserDomain, focusUserPassword, focusUserName); jitsiMeetServices = new JitsiMeetServices( protocolProviderHandler.getOperationSet(OperationSetSubscription.class)); String statsPubSubNode = config.getString(SHARED_STATS_PUBSUB_NODE_PNAME); componentsDiscovery = new ComponentsDiscovery(jitsiMeetServices); componentsDiscovery.start(xmppDomain, statsPubSubNode, protocolProviderHandler); meetExtensionsHandler = new MeetExtensionsHandler(this); ProviderManager.getInstance() .addExtensionProvider( LogPacketExtension.LOG_ELEM_NAME, LogPacketExtension.NAMESPACE, new LogExtensionProvider()); FocusBundleActivator.bundleContext.registerService( JitsiMeetServices.class, jitsiMeetServices, null); protocolProviderHandler.addRegistrationListener(this); protocolProviderHandler.register(); }