org.pircbotx
Class InputThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.pircbotx.InputThread
All Implemented Interfaces:
Runnable

public class InputThread
extends Thread

A Thread which reads lines from the IRC server. It then passes these lines to the PircBotX without changing them. This running Thread also detects disconnection from the server and is thus used by the OutputThread to send lines to the server.

Author:
Origionally by: Paul James Mutton for PircBot

Forked and Maintained by in PircBotX: Leon Blakey


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static int MAX_LINE_LENGTH
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
 void run()
          Called to start this Thread reading lines from the IRC server.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_LINE_LENGTH

public static final int MAX_LINE_LENGTH
See Also:
Constant Field Values
Method Detail

run

public void run()
Called to start this Thread reading lines from the IRC server. When a line is read, this method calls the handleLine method in the PircBotX, which may subsequently call an 'onXxx' method in the PircBotX subclass. If any subclass of Throwable (i.e. any Exception or Error) is thrown by your method, then this method will print the stack trace to the standard output. It is probable that the PircBotX may still be functioning normally after such a problem, but the existence of any uncaught exceptions in your code is something you should really fix.

Specified by:
run in interface Runnable
Overrides:
run in class Thread


Copyright © 2010-2011 Leon Blakey. All Rights Reserved.