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

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

java 1次浏览

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

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

示例1: handleSnacPacket

点赞 2

import net.kano.joscar.snac.SnacPacketEvent; //导入依赖的package包/类
@Override
    protected void handleSnacPacket(SnacPacketEvent e) {
//        Log.debug("OSCAR email snac packet received: "+e);

        SnacCommand cmd = e.getSnacCommand();

        if (cmd instanceof ServerReadyCmd) {
            ServerReadyCmd src = (ServerReadyCmd) cmd;
            setSnacFamilies(src.getSnacFamilies());

            Collection<SnacFamilyInfo> familyInfos = new ArrayList<SnacFamilyInfo>();
            familyInfos.add(ConnCommand.FAMILY_INFO);
            familyInfos.add(MailCheckCmd.FAMILY_INFO);
            setSnacFamilyInfos(familyInfos);

            getMainSession().registerSnacFamilies(this);

            request(new ClientVersionsCmd(familyInfos));
            request(new RateInfoRequest());
        }
        else if (cmd instanceof MailUpdate) {
            MailUpdate mu = (MailUpdate)cmd;
            if (JiveGlobals.getBooleanProperty("plugin.gateway."+getMainSession().getTransport().getType()+".mailnotifications", true) && lastMailCount < mu.getUnreadCount()) {
                Integer diff = mu.getUnreadCount() - lastMailCount;
                if (diff > 0) {
                    getMainSession().getTransport().sendMessage(
                            getMainSession().getJID(),
                            getMainSession().getTransport().getJID(),
                            LocaleUtils.getLocalizedString("gateway.oscar.mail", "kraken", Arrays.asList(Integer.toString(diff), mu.getDomain(), mu.getUrl())),
                            Message.Type.headline
                    );
                }
            }
            lastMailCount = mu.getUnreadCount();
        }
        else {
            super.handleSnacPacket(e);
        }
    }
 

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

示例2: handleSnacPacket

点赞 2

import net.kano.joscar.snac.SnacPacketEvent; //导入依赖的package包/类
@Override
protected void handleSnacPacket(SnacPacketEvent e) {
    super.handleSnacPacket(e);
}
 

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

示例3: handleSnacPacket

点赞 2

import net.kano.joscar.snac.SnacPacketEvent; //导入依赖的package包/类
@Override
protected void handleSnacPacket(SnacPacketEvent e) { }
 

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

示例4: handleSnacPacket

点赞 1

import net.kano.joscar.snac.SnacPacketEvent; //导入依赖的package包/类
protected abstract void handleSnacPacket(SnacPacketEvent e); 

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


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