public class BasicIRCStreamDataset extends AbstractIRCStreamDataset<Context>
Context
objects. The contexts contain keys for channel, sender,
login, hostname and message. All values are String
s.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, register
close, getBuffer, hasNext, next
filter, forEach, forEach, forEach, iterator, map, map, parallelForEach, parallelForEach, remove, transform
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
filter, forEach, forEach, forEach, map, map, parallelForEach, parallelForEach, transform
forEachRemaining, hasNext, next, remove
forEach, iterator, spliterator
public 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 channelIOException
public BasicIRCStreamDataset(BlockingDroppingQueue<Context> buffer, String hostname, String channel) throws IOException
buffer
- the bufferhostname
- the hostchannel
- the channelIOException
public Context construct(String channel, String sender, String login, String hostname, String message)
AbstractIRCStreamDataset
PircBot.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