sametime + domino + notes

liuttorrie 2010-05-05

需要配置本地classpath

服务器端domino配置notes.ini和相关配置

http://www-01.ibm.com/support/docview.wss?uid=swg21257359

http://www.ibm.com/developerworks/cn/lotus/sametime75-todo/index.html#download

拿到ltpatoken实现sso

public void generatetoken()
	{
		try
		{
			CommunityService communityMgr = (CommunityService) ServiceHub
			.getService(CommunityService.SERVICE_TYPE);
			 RtcSession rs = communityMgr.getDefaultCommunity().getRtcSession();
			 m_session=(STSession) rs.getProtocolSession();
			 TokenComp m_token = (TokenComp)m_session.getCompApi(TokenComp.COMP_NAME);
			 m_token.addTokenServiceListener(this);
			 m_token.generateToken();
		}catch(Exception ex)
		{
			ex.printStackTrace();
		}

	}

 public void tokenGenerated(TokenEvent evt)
	  {
		  System.out.println(evt.getToken().getLoginName());
		  System.out.println(evt.getToken().getTokenString());
		  
		  ModelManager manager = ModelManager.getInstance();
		  manager.setTokenString(evt.getToken().getTokenString());
		  ModelManager.getInstance().fireEvent(new ModelEvent(ModelManager.getInstance() , 8 , this));
	  }

tokenGenerated不是及时执行,项目中先采取了Thread.sleep(3000l);

想到更好的方法以后再来更新。

相关推荐

DodderB / 0评论 2010-08-13
hyMiss / 0评论 2010-05-10