当前位置: 首页>>代码示例>>Java>>正文


Java IRCEventAdapter类代码示例

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


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

示例1: doSetup

import org.schwering.irc.lib.IRCEventAdapter; //导入依赖的package包/类
@Before
public void doSetup() {
    connection = mock(IRCConnection.class);
    endpoint = mock(IrcEndpoint.class);
    configuration = mock(IrcConfiguration.class);
    listener = mock(IRCEventAdapter.class);
    exchange = mock(Exchange.class);
    message = mock(Message.class);

    List<IrcChannel> channels = new ArrayList<IrcChannel>();
    channels.add(new IrcChannel("#chan1", null));
    channels.add(new IrcChannel("#chan2", "chan2key"));

    when(configuration.getChannels()).thenReturn(channels);
    when(endpoint.getConfiguration()).thenReturn(configuration);

    producer = new IrcProducer(endpoint, connection);
    producer.setListener(listener);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:20,代码来源:IrcProducerTest.java

示例2: doSetup

import org.schwering.irc.lib.IRCEventAdapter; //导入依赖的package包/类
@Before
public void doSetup() {
    connection = mock(IRCConnection.class);
    endpoint = mock(IrcEndpoint.class);
    processor = mock(Processor.class);
    configuration = mock(IrcConfiguration.class);
    listener = mock(IRCEventAdapter.class);

    List<IrcChannel> channels = new ArrayList<IrcChannel>();
    channels.add(new IrcChannel("#chan1", null));
    channels.add(new IrcChannel("#chan2", "chan2key"));

    when(configuration.getChannels()).thenReturn(channels);
    when(endpoint.getConfiguration()).thenReturn(configuration);

    consumer = new IrcConsumer(endpoint, processor, connection);
    consumer.setListener(listener);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:19,代码来源:IrcConsumerTest.java

示例3: getListener

import org.schwering.irc.lib.IRCEventAdapter; //导入依赖的package包/类
public IRCEventAdapter getListener() {
    if (listener == null) {
        listener = new FilteredIRCEventAdapter();
    }
    return listener;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:7,代码来源:IrcProducer.java

示例4: setListener

import org.schwering.irc.lib.IRCEventAdapter; //导入依赖的package包/类
public void setListener(IRCEventAdapter listener) {
    this.listener = listener;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:IrcProducer.java


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