• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ImEvent类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中com.lotus.sametime.im.ImEvent的典型用法代码示例。如果您正苦于以下问题:Java ImEvent类的具体用法?Java ImEvent怎么用?Java ImEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ImEvent类属于com.lotus.sametime.im包,在下文中一共展示了ImEvent类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: imReceived

点赞 3

import com.lotus.sametime.im.ImEvent; //导入依赖的package包/类
public void imReceived(ImEvent imEvent) {
    Log.debug("SameTime: Received IM: "+imEvent);
    Im im = imEvent.getIm();
    boolean imExists = false;
    Im currentIm = null;
    
    for (int i = 0; i < imOpened.size(); i++) {
        currentIm = imOpened.elementAt(i);
        if(currentIm.equals(im)) {
            imExists = true;
            im = currentIm;
            break;
        }
    }
    
    if (!imExists) {
      imOpened.addElement(im);
      im.addImListener(this);
    }   
}
 

开发者ID:igniterealtime,
项目名称:Openfire,
代码行数:21,
代码来源:SameTimeListener.java

示例2: imOpened

点赞 3

import com.lotus.sametime.im.ImEvent; //导入依赖的package包/类
public void imOpened(ImEvent arg0) {
	BrokerFactory.getLoggingBroker().logDebug("Im Opened");
	STUserStatus status = arg0.getIm().getAcceptingSideStatus();
	BrokerFactory.getLoggingBroker().logDebug(recipient+"'s SameTime status = "+status);
	if ((status != null) &&
			((status.isStatus(STUserStatus.ST_USER_STATUS_DND)) || 
			(status.isStatus(STUserStatus.ST_USER_STATUS_OFFLINE)))) {
		notification.addMessage(recipient+" is not accepting SameTime messages", null);
		if (notification != null)
			parent.setStatusOfSend(notification, "failed");
	} else {
		arg0.getIm().sendText(false, text);
		directory.removeDirectoryListener(this);
		if (notification != null)
			parent.setStatusOfSend(notification, "succeeded");
	}

}
 

开发者ID:davidrudder23,
项目名称:OpenNotification,
代码行数:19,
代码来源:SameTimeNotificationProvider.java

示例3: imClosed

点赞 2

import com.lotus.sametime.im.ImEvent; //导入依赖的package包/类
public void imClosed(ImEvent imEvent) {
    Log.debug("SameTime: Closed IM session: "+imEvent);
    Im im = imEvent.getIm();
    Im currentIm = null;
    
    for (int i = 0; i < imOpened.size(); i++) {
        currentIm = imOpened.elementAt(i);
        if (currentIm.equals(im)) {
            imOpened.removeElement(im);
            im.close(0);
            im.removeImListener(this);
            break;
        }
    }
}
 

开发者ID:igniterealtime,
项目名称:Openfire,
代码行数:16,
代码来源:SameTimeListener.java

示例4: textReceived

点赞 2

import com.lotus.sametime.im.ImEvent; //导入依赖的package包/类
public void textReceived(ImEvent imEvent) {
    Log.debug("SameTime: Received IM text: "+imEvent);
    getSession().getTransport().sendMessage(
        getSession().getJID(),
        getSession().getTransport().convertIDToJID(imEvent.getIm().getPartner().getName()),
        imEvent.getText()
    );
}
 

开发者ID:igniterealtime,
项目名称:Openfire,
代码行数:9,
代码来源:SameTimeListener.java

示例5: openImFailed

点赞 2

import com.lotus.sametime.im.ImEvent; //导入依赖的package包/类
public void openImFailed(ImEvent arg0) {
	BrokerFactory.getLoggingBroker().logDebug("Im Open Failed");
	if (notification != null) {
		notification.addMessage("Sending IM to "+recipient+" via SameTime failed.  "+recipient+" is probably not logged in.", null);
		if (notification != null)
			parent.setStatusOfSend(notification, "failed");
	}

}
 

开发者ID:davidrudder23,
项目名称:OpenNotification,
代码行数:10,
代码来源:SameTimeNotificationProvider.java

示例6: dataReceived

点赞 2

import com.lotus.sametime.im.ImEvent; //导入依赖的package包/类
public void dataReceived(ImEvent imEvent) {
    Log.debug("SameTime: Data Received data type = " + imEvent.getDataType());
}
 

开发者ID:igniterealtime,
项目名称:Openfire,
代码行数:4,
代码来源:SameTimeListener.java

示例7: imOpened

点赞 2

import com.lotus.sametime.im.ImEvent; //导入依赖的package包/类
public void imOpened(ImEvent imEvent) {
    // We are not doing anything when an IM session is opened
    Log.debug("SameTime: Opened IM session: "+imEvent);
}
 

开发者ID:igniterealtime,
项目名称:Openfire,
代码行数:5,
代码来源:SameTimeListener.java

示例8: openImFailed

点赞 2

import com.lotus.sametime.im.ImEvent; //导入依赖的package包/类
public void openImFailed(ImEvent imEvent) {
    Log.error("SameTime: Failed to open IM session: "+imEvent);
}
 

开发者ID:igniterealtime,
项目名称:Openfire,
代码行数:4,
代码来源:SameTimeListener.java

示例9: dataReceived

点赞 2

import com.lotus.sametime.im.ImEvent; //导入依赖的package包/类
public void dataReceived(ImEvent arg0) {
}
 

开发者ID:davidrudder23,
项目名称:OpenNotification,
代码行数:3,
代码来源:SameTimeNotificationProvider.java

示例10: imClosed

点赞 2

import com.lotus.sametime.im.ImEvent; //导入依赖的package包/类
public void imClosed(ImEvent arg0) {
}
 

开发者ID:davidrudder23,
项目名称:OpenNotification,
代码行数:3,
代码来源:SameTimeNotificationProvider.java

示例11: textReceived

点赞 2

import com.lotus.sametime.im.ImEvent; //导入依赖的package包/类
public void textReceived(ImEvent event) {
	String text = event.getText();	
	String from = event.getIm().getPartner().getName();
	textReceived(text, from);
}
 

开发者ID:davidrudder23,
项目名称:OpenNotification,
代码行数:6,
代码来源:SameTimeNotificationProvider.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)