10.07.2015 Views

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Example 12-10 SametimeToken variables// session objectprotected STSession m_session;// server application objectprotected ServerAppService m_saService;// lookup service objectprotected LookupService m_lookupService;// resolver objectprotected Resolver m_resolver;// sa token service objectprotected SATokenService m_tokenService;In the class’ constructor, we create a new Sametime session and load thecomponents we need into it. We then start the session and attempt to log in tothe server.Note: In the Sametime 3.1 Community Server Toolkit, the SATokenServicecomponent does not load if you use the loadAllComponents() orloadComponents() methods. You must load it explicitly as shown inExample 12-11.Example 12-11 SametimeToken constructorprotected SametimeToken(String strUserName) throws ServletException{m_strUserName = strUserName;try{m_session = new STSession("TokenGenerator " + this);String[] strNames = { ServerAppService.COMP_NAME,LookupService.COMP_NAME };// load the ServerAppService and LookupService componentsm_session.loadComponents(strNames);m_saService = (ServerAppService)m_session.getCompApi(ServerAppService.COMP_NAME);m_lookupService = (LookupService)m_session.getCompApi(LookupService.COMP_NAME);// load the SATokenService componentnew SATokenComp(m_session);m_tokenService =(SATokenService)m_session.getCompApi(SATokenService.COMP_NAME);m_session.start();}login();Chapter 12. Ideas for customization and integration 345

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!