本文整理汇总了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);
}
示例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);
}
示例3: getListener
import org.schwering.irc.lib.IRCEventAdapter; //导入依赖的package包/类
public IRCEventAdapter getListener() {
if (listener == null) {
listener = new FilteredIRCEventAdapter();
}
return listener;
}
示例4: setListener
import org.schwering.irc.lib.IRCEventAdapter; //导入依赖的package包/类
public void setListener(IRCEventAdapter listener) {
this.listener = listener;
}