org.jibble.pircbot
Class OutputThread
java.lang.Object
|
+--java.lang.Thread
|
+--org.jibble.pircbot.OutputThread
- All Implemented Interfaces:
- Runnable
- public class OutputThread
- extends Thread
A Thread which is responsible for sending messages to the IRC server.
Messages are obtained from the outgoing message queue and sent
immediately if possible. If there is a flood of messages, then to
avoid getting kicked from a channel, we put a small delay between
each one.
- Version:
- 1.0.0 (Build time: Fri Jan 3 22:26:30 2003)
- Author:
- Paul James Mutton,
http://www.jibble.org/
Constructor Summary |
protected |
OutputThread(PircBot bot,
Queue outQueue)
Constructs an OutputThread for the underlying PircBot. |
Method Summary |
void |
run()
This method starts the Thread consuming from the outgoing message
Queue and sending lines to the server. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
OutputThread
protected OutputThread(PircBot bot,
Queue outQueue)
- Constructs an OutputThread for the underlying PircBot. All messages
sent to the IRC server are sent by this OutputThread to avoid hammering
the server. Messages are sent immediately if possible. If there are
multiple messages queued, then there is a delay imposed.
- Parameters:
bot
- The underlying PircBot instance.outQueue
- The Queue from which we will obtain our messages.
run
public void run()
- This method starts the Thread consuming from the outgoing message
Queue and sending lines to the server.
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread