• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IRCUser类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: onKick

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
@Override
public void onKick(String channel, IRCUser user, String passiveNick, String msg) {

    // check to see if I got kick and if so rejoin if autoRejoin is on
    if (passiveNick.equals(connection.getNick()) && configuration.isAutoRejoin()) {
        endpoint.joinChannel(channel);
    }

    if (configuration.isOnKick()) {
        Exchange exchange = endpoint.createOnKickExchange(channel, user, passiveNick, msg);
        try {
            getProcessor().process(exchange);
        } catch (Exception e) {
            handleException(e);
        }
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:18,代码来源:IrcConsumer.java


示例2: onPrivmsg

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
@Override
public void onPrivmsg(String arg0, IRCUser arg1, String arg2) {
	final String message;

	if (arg2.startsWith("ACTION")) {
		message = "* " + arg1.getNick() + " " + arg2.substring(6);
	} else {
		message = "&lt;<font color='#003366'>" + arg1.getNick()
				+ "</font>&gt; " + arg2;
	}

	runOnUiThread(new Runnable() {
		@Override
		public void run() {
			chatBox.append(Html.fromHtml(message + "<br />"));
			scrollDown();
		}
	});
}
 
开发者ID:cherrymathew,项目名称:evend,代码行数:20,代码来源:ChatActivity.java


示例3: IRCMessage

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
public IRCMessage(String channel, IRCUser user, String message) {
    super(SCHEMA);
    this.put("timestamp", System.currentTimeMillis());
    this.put("channel", channel);
    this.put("message", message);
    this.put("user", new Struct(SCHEMA.field("user").schema())
            .put("nick", user.getNick())
            .put("username", user.getUsername())
            .put("host", user.getHost())
    );
}
 
开发者ID:amient,项目名称:hello-kafka-streams,代码行数:12,代码来源:IRCMessage.java


示例4: onPrivmsg

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
@Override
public void onPrivmsg(String channel, IRCUser u, String msg) {
    IRCMessage event = new IRCMessage(channel, u, msg);
    //FIXME kafka round robin default partitioner seems to always publish to partition 0 only (?)
    long ts = event.getInt64("timestamp");
    Map<String, ?> srcOffset = Collections.singletonMap(TIMESTAMP_FIELD, ts);
    Map<String, ?> srcPartition = Collections.singletonMap(CHANNEL_FIELD, channel);
    SourceRecord record = new SourceRecord(srcPartition, srcOffset, topic, KEY_SCHEMA, ts, IRCMessage.SCHEMA, event);
    queue.offer(record);
}
 
开发者ID:amient,项目名称:hello-kafka-streams,代码行数:11,代码来源:IRCFeedTask.java


示例5: onInvite

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
@Override
public void onInvite(String chan, IRCUser user, String passiveNick) {
  String content = user.getNick() + " invited me to join " + chan;
  logger.info(content);
  joinChannel(chan);
  this.repository.add(chan);
  this.bus.broadcast(message(content)).as("irc.invited");
}
 
开发者ID:devnull-tools,项目名称:boteco,代码行数:9,代码来源:BotecoIrcEventListener.java


示例6: onKick

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
@Override
public void onKick(String chan, IRCUser user, String passiveNick, String msg) {
  if (passiveNick.equals(configuration.getNickname())) {
    String content = user.getNick() + " kicked me from " + chan;
    logger.info(content);
    this.bus.broadcast(message(content)).as("irc.kicked");
    this.repository.remove(chan);
  }
}
 
开发者ID:devnull-tools,项目名称:boteco,代码行数:10,代码来源:BotecoIrcEventListener.java


示例7: onPrivmsg

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
@Override
public void onPrivmsg(String target, IRCUser user, String msg) {
	LOG.debug("[{}] {}: {}.", target, user.getNick(), msg);

	WikipediaEditEvent event = WikipediaEditEvent.fromRawEvent(
			System.currentTimeMillis(),
			target,
			msg);

	if (event != null) {
		if (!edits.offer(event)) {
			LOG.debug("Dropping message, because of full queue.");
		}
	}
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:16,代码来源:WikipediaEditEventIrcStream.java


示例8: onKick

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
@Override
public void onKick(String channel, IRCUser user, String passiveNick, String msg) {

    // check to see if I got kick and if so rejoin if autoRejoin is on
    if (passiveNick.equals(connection.getNick()) && endpoint.getConfiguration().isAutoRejoin()) {
        endpoint.joinChannel(channel);
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:9,代码来源:IrcProducer.java


示例9: IrcMessage

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
public IrcMessage(String messageType, String target, IRCUser user, String message) {
    this.messageType = messageType;
    this.target = target;
    this.user = user;
    this.message = message;
    setBody(message);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:IrcMessage.java


示例10: onNick

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
@Override
public void onNick(IRCUser user, String newNick) {
    if (configuration.isOnNick()) {
        Exchange exchange = endpoint.createOnNickExchange(user, newNick);
        try {
            getProcessor().process(exchange);
        } catch (Exception e) {
            handleException(e);
        }
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:12,代码来源:IrcConsumer.java


示例11: onQuit

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
@Override
public void onQuit(IRCUser user, String msg) {
    if (configuration.isOnQuit()) {
        Exchange exchange = endpoint.createOnQuitExchange(user, msg);
        try {
            getProcessor().process(exchange);
        } catch (Exception e) {
            handleException(e);
        }
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:12,代码来源:IrcConsumer.java


示例12: onJoin

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
@Override
public void onJoin(String channel, IRCUser user) {
    if (configuration.isOnJoin()) {
        Exchange exchange = endpoint.createOnJoinExchange(channel, user);
        try {
            getProcessor().process(exchange);
        } catch (Exception e) {
            handleException(e);
        }
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:12,代码来源:IrcConsumer.java


示例13: onMode

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
@Override
public void onMode(String channel, IRCUser user, IRCModeParser modeParser) {
    if (configuration.isOnMode()) {
        Exchange exchange = endpoint.createOnModeExchange(channel, user, modeParser);
        try {
            getProcessor().process(exchange);
        } catch (Exception e) {
            handleException(e);
        }
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:12,代码来源:IrcConsumer.java


示例14: onPart

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
@Override
public void onPart(String channel, IRCUser user, String msg) {
    if (configuration.isOnPart()) {
        Exchange exchange = endpoint.createOnPartExchange(channel, user, msg);
        try {
            getProcessor().process(exchange);
        } catch (Exception e) {
            handleException(e);
        }
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:12,代码来源:IrcConsumer.java


示例15: onTopic

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
@Override
public void onTopic(String channel, IRCUser user, String topic) {
    if (configuration.isOnTopic()) {
        Exchange exchange = endpoint.createOnTopicExchange(channel, user, topic);
        try {
            getProcessor().process(exchange);
        } catch (Exception e) {
            handleException(e);
        }
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:12,代码来源:IrcConsumer.java


示例16: onPrivmsg

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
@Override
public void onPrivmsg(String target, IRCUser user, String msg) {
    if (configuration.isOnPrivmsg()) {
        Exchange exchange = endpoint.createOnPrivmsgExchange(target, user, msg);
        try {
            getProcessor().process(exchange);
        } catch (Exception e) {
            handleException(e);
        }
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:12,代码来源:IrcConsumer.java


示例17: onMode

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
@Override
public void onMode(String string, IRCUser ircUser, IRCModeParser ircModeParser) {
    super.onMode(string, ircUser, ircModeParser);
    LOG.info("onMode.string = " + string);
    LOG.info("onMode.ircUser = " + ircUser);
    LOG.info("onMode.ircModeParser = " + ircModeParser);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:CodehausIrcChat.java


示例18: onPrivmsg

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
public void onPrivmsg(String chan, IRCUser u, String msg) {
  Set<WikipediaFeedListener> listeners = channelListeners.get(chan);

  if (listeners != null) {
    WikipediaFeedEvent event = new WikipediaFeedEvent(System.currentTimeMillis(), chan, u.getNick(), msg);

    for (WikipediaFeedListener listener : listeners) {
      listener.onEvent(event);
    }
  }

  log.debug(chan + "> " + u.getNick() + ": " + msg);
}
 
开发者ID:yoloanalytics,项目名称:bigdata-swamp,代码行数:14,代码来源:WikipediaFeed.java


示例19: onJoin

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
@Override
public void onJoin(String arg0, IRCUser arg1) {
	runOnUiThread(new Runnable() {
		@Override
		public void run() {
			chatBox.append(Html.fromHtml("<b>- Joined " + channelIRC
					+ " channel</b><br/>"));
			send.setEnabled(true);
			scrollDown();
		}
	});
}
 
开发者ID:cherrymathew,项目名称:evend,代码行数:13,代码来源:ChatActivity.java


示例20: onInvite

import org.schwering.irc.lib.IRCUser; //导入依赖的package包/类
/**
 * @param chan
 * @param user
 * @return void
 */
public void onInvite(String chan, IRCUser user, String nickPass) {
    logger.debug("User {} was invited to channel {}.", user.getNick(), chan);
    headers.put(IRCConstants.HEADER_TYPE, "invite");
    headers.put(IRCConstants.HEADER_CHANNEL, chan);
    headers.putAll(getUser(user));
    send("", headers);
}
 
开发者ID:Stratio,项目名称:ingestion,代码行数:13,代码来源:IRCSource.java



注:本文中的org.schwering.irc.lib.IRCUser类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Connector类代码示例发布时间:2022-05-22
下一篇:
Java RecipePetals类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap