com.vwp.net.irc
Class Ident

java.lang.Object
  extended by java.lang.Thread
      extended by com.vwp.net.irc.Ident
All Implemented Interfaces:
Runnable

public class Ident
extends Thread

A simple IdentServer which provides a means to determine the identity of a user of a particular TCP connection. Most IRC servers attempt to contact the ident server on connecting hosts in order to determine the user's identity. Some IRC servers will not allow you to connect unless this information is provided. An instance of this class can be used to start up an ident server only if it is possible to do so. Reasons for not being able to do so are if there is already an ident server running on port 113, or if you are running as an unprivileged user who is unable to create a server socket with that port number.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Ident(MessagePipe MsgPipe, String LoginName)
          Constructs and starts an instance of an IdentServer that responds to a client with the provided LoginName.
 
Method Summary
 void run()
          Waits for a client to connect to the ident server before making a response.
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Ident

public Ident(MessagePipe MsgPipe,
             String LoginName)
Constructs and starts an instance of an IdentServer that responds to a client with the provided LoginName. The ServerSocket times out after two minutes or if a ident-request was processed. This class is called from IRC automatically but it can be used separately too.

Parameters:
MsgPipe - the MessagePipe used for communication
LoginName - the required LoginName for the identification
Method Detail

run

public void run()
Waits for a client to connect to the ident server before making a response. Please note that this method is started by the constructor.

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