f00f.net.irc.martyr.dcc
Class DccChatHandler

java.lang.Object
  extended by java.lang.Thread
      extended by f00f.net.irc.martyr.dcc.DccChatHandler
All Implemented Interfaces:
java.lang.Runnable

public class DccChatHandler
extends java.lang.Thread

See Also:
AutoDccSetup

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
DccChatHandler()
           
DccChatHandler(java.net.Socket socket)
           
 
Method Summary
protected  void handleDccChat(java.net.Socket socket)
          A call to this method means that a connection has been established and chat should commence.
 void run()
           
 void setSocket(java.net.Socket sock)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DccChatHandler

public DccChatHandler(java.net.Socket socket)

DccChatHandler

public DccChatHandler()
Method Detail

handleDccChat

protected void handleDccChat(java.net.Socket socket)
                      throws java.io.IOException
A call to this method means that a connection has been established and chat should commence. The default implementation closes the stream immediatly. A better implementation would read a line from the input stream and send output to the output stream. The chat protocol is raw text.

Parameters:
socket - Socket over which chat will be handled
Throws:
java.io.IOException - if connection could not be established

setSocket

public void setSocket(java.net.Socket sock)

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread


Copyright © 2000-2007 Ben Damm, Daniel Henninger, et al.