2
我想我問的是有什麼方法可以發送SameTime消息給用戶?該版本是集成到Notes 8.5中的版本。如何從其他系統向SameTime用戶發送消息?
是否有命令行,Web服務,.Net API,Java API,LotusScript Orr其他的東西?
我想我問的是有什麼方法可以發送SameTime消息給用戶?該版本是集成到Notes 8.5中的版本。如何從其他系統向SameTime用戶發送消息?
是否有命令行,Web服務,.Net API,Java API,LotusScript Orr其他的東西?
有一個免費的Java API here。下面的摘錄是如何發送消息的簡單示例。
final STSession session = new STSession("SameTimeSender");
session.loadAllComponents();
session.start();
CommunityService comm = (CommunityService) session.getCompApi(CommunityService.COMP_NAME);
comm.addLoginListener(new LoginListener() {
public void loggedOut(LoginEvent arg0) {
}
public void loggedIn(LoginEvent arg0) {
LookupService lookup = (LookupService) session.getCompApi(LookupService.COMP_NAME);
Resolver resolver = lookup.createResolver(true, false, true, false);
resolver.addResolveListener(new ResolveListener() {
public void resolved(ResolveEvent re) {
STUser user = (STUser) re.getResolved();
InstantMessagingService imservice = (InstantMessagingService) session.getCompApi(InstantMessagingService.COMP_NAME);
final Im im = imservice.createIm(user, EncLevel.ENC_LEVEL_NONE, ImTypes.IM_TYPE_CHAT);
im.addImListener(new ImListener() {
public void textReceived(ImEvent arg0) {
}
public void openImFailed(ImEvent arg0) {
}
public void imOpened(ImEvent arg0) {
im.sendText(false, "hello world!");
}
public void imClosed(ImEvent arg0) {
}
public void dataReceived(ImEvent arg0) {
}
});
im.open();
}
public void resolveFailed(ResolveEvent arg0) {
}
public void resolveConflict(ResolveEvent arg0) {
}
});
resolver.resolve(recipientId);
}
});
comm.loginByPassword(hostname, userId, password);