public class BasicIRCStreamDataset extends AbstractIRCStreamDataset<Context>
Context objects. The contexts contain keys for channel, sender,
login, hostname and message. All values are Strings.| Modifier and Type | Field and Description |
|---|---|
String |
CHANNEL_KEY
The IRC channel name key
|
String |
HOSTNAME_KEY
The host name key
|
String |
LOGIN_KEY
The login key
|
String |
MESSAGE_KEY
The message text key
|
String |
SENDER_KEY
The sender key
|
| Constructor and Description |
|---|
BasicIRCStreamDataset(BlockingDroppingQueue<Context> buffer,
String hostname,
String channel)
Construct with the given buffer, connecting to the given host and
channel.
|
BasicIRCStreamDataset(String hostname,
String channel)
Connect to the given host and channel.
|
| Modifier and Type | Method and Description |
|---|---|
Context |
construct(String channel,
String sender,
String login,
String hostname,
String message)
Called by
PircBot.onMessage(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) |
getRandomInstance, numInstances, registerclose, getBuffer, hasNext, nextfilter, forEach, forEach, forEach, iterator, map, map, parallelForEach, parallelForEach, remove, transformclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfilter, forEach, forEach, forEach, map, map, parallelForEach, parallelForEach, transformforEachRemaining, hasNext, next, removeforEach, iterator, spliteratorpublic String CHANNEL_KEY
public String SENDER_KEY
public String HOSTNAME_KEY
public String MESSAGE_KEY
public BasicIRCStreamDataset(String hostname, String channel) throws IOException
ArrayBlockingDroppingQueue with size of 1 is created to
buffer/drop messages.hostname - the hostchannel - the channelIOExceptionpublic BasicIRCStreamDataset(BlockingDroppingQueue<Context> buffer, String hostname, String channel) throws IOException
buffer - the bufferhostname - the hostchannel - the channelIOExceptionpublic Context construct(String channel, String sender, String login, String hostname, String message)
AbstractIRCStreamDatasetPircBot.onMessage(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)construct in class AbstractIRCStreamDataset<Context>channel - the channel to which the message was sentsender - the sender of the message (their nick)login - the login of the message senderhostname - the hostname of the message sendermessage - the message itself