com.mindbright.net.telnet
Class TelnetNVT

java.lang.Object
  extended bycom.mindbright.net.telnet.TelnetNVT
All Implemented Interfaces:
java.lang.Runnable

public class TelnetNVT
extends java.lang.Object
implements java.lang.Runnable


Field Summary
static int CODE_ABORT
           
static int CODE_AYT
           
static int CODE_BREAK
           
static int CODE_CR
           
static int CODE_DM
           
static int CODE_DO
           
static int CODE_DONT
           
static int CODE_EC
           
static int CODE_EL
           
static int CODE_EOR
           
static int CODE_GA
           
static int CODE_IAC
           
static int CODE_IP
           
static int CODE_LF
           
static int CODE_NOP
           
static int CODE_SB
           
static int CODE_SE
           
static int CODE_WILL
           
static int CODE_WONT
           
static int OPT_ECHO
           
static int OPT_EOR
           
static int OPT_NAWS
           
static int OPT_NEWENV
           
static int OPT_REMFCTL
           
static int OPT_SGA
           
static int OPT_SPEED
           
static int OPT_STATUS
           
static int OPT_TTYPE
           
static int OPT_XDISP
           
static int SB_CMD_IS
           
static int SB_CMD_NAME
           
static int SB_CMD_REPLY
           
static int SB_CMD_SEND
           
 
Constructor Summary
TelnetNVT(TelnetEventHandler eventHandler, java.io.InputStream in, java.io.OutputStream out)
           
 
Method Summary
 void dontOption(int option)
           
 void doOption(int option)
           
 java.lang.Thread getThread()
           
protected  int interpretAsCommand(int cmd)
           
protected  void optionNegotiation(int option, int request)
           
 void run()
           
 void sendCR()
           
 void sendData(byte[] data, int off, int sz)
           
 void sendData(int b)
           
 void sendOptionSubNegotiation(int option, byte[] params)
           
 void start()
           
 void willOption(int option)
           
 void wontOption(int option)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CODE_LF

public static final int CODE_LF
See Also:
Constant Field Values

CODE_CR

public static final int CODE_CR
See Also:
Constant Field Values

CODE_EOR

public static final int CODE_EOR
See Also:
Constant Field Values

CODE_SE

public static final int CODE_SE
See Also:
Constant Field Values

CODE_NOP

public static final int CODE_NOP
See Also:
Constant Field Values

CODE_DM

public static final int CODE_DM
See Also:
Constant Field Values

CODE_BREAK

public static final int CODE_BREAK
See Also:
Constant Field Values

CODE_IP

public static final int CODE_IP
See Also:
Constant Field Values

CODE_ABORT

public static final int CODE_ABORT
See Also:
Constant Field Values

CODE_AYT

public static final int CODE_AYT
See Also:
Constant Field Values

CODE_EC

public static final int CODE_EC
See Also:
Constant Field Values

CODE_EL

public static final int CODE_EL
See Also:
Constant Field Values

CODE_GA

public static final int CODE_GA
See Also:
Constant Field Values

CODE_SB

public static final int CODE_SB
See Also:
Constant Field Values

CODE_WILL

public static final int CODE_WILL
See Also:
Constant Field Values

CODE_WONT

public static final int CODE_WONT
See Also:
Constant Field Values

CODE_DO

public static final int CODE_DO
See Also:
Constant Field Values

CODE_DONT

public static final int CODE_DONT
See Also:
Constant Field Values

CODE_IAC

public static final int CODE_IAC
See Also:
Constant Field Values

OPT_ECHO

public static final int OPT_ECHO
See Also:
Constant Field Values

OPT_SGA

public static final int OPT_SGA
See Also:
Constant Field Values

OPT_STATUS

public static final int OPT_STATUS
See Also:
Constant Field Values

OPT_TTYPE

public static final int OPT_TTYPE
See Also:
Constant Field Values

OPT_EOR

public static final int OPT_EOR
See Also:
Constant Field Values

OPT_NAWS

public static final int OPT_NAWS
See Also:
Constant Field Values

OPT_SPEED

public static final int OPT_SPEED
See Also:
Constant Field Values

OPT_REMFCTL

public static final int OPT_REMFCTL
See Also:
Constant Field Values

OPT_XDISP

public static final int OPT_XDISP
See Also:
Constant Field Values

OPT_NEWENV

public static final int OPT_NEWENV
See Also:
Constant Field Values

SB_CMD_IS

public static final int SB_CMD_IS
See Also:
Constant Field Values

SB_CMD_SEND

public static final int SB_CMD_SEND
See Also:
Constant Field Values

SB_CMD_REPLY

public static final int SB_CMD_REPLY
See Also:
Constant Field Values

SB_CMD_NAME

public static final int SB_CMD_NAME
See Also:
Constant Field Values
Constructor Detail

TelnetNVT

public TelnetNVT(TelnetEventHandler eventHandler,
                 java.io.InputStream in,
                 java.io.OutputStream out)
Method Detail

start

public void start()

run

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

getThread

public java.lang.Thread getThread()

sendData

public void sendData(byte[] data,
                     int off,
                     int sz)
              throws java.io.IOException
Throws:
java.io.IOException

sendData

public void sendData(int b)
              throws java.io.IOException
Throws:
java.io.IOException

sendCR

public void sendCR()
            throws java.io.IOException
Throws:
java.io.IOException

doOption

public void doOption(int option)
              throws java.io.IOException
Throws:
java.io.IOException

dontOption

public void dontOption(int option)
                throws java.io.IOException
Throws:
java.io.IOException

willOption

public void willOption(int option)
                throws java.io.IOException
Throws:
java.io.IOException

wontOption

public void wontOption(int option)
                throws java.io.IOException
Throws:
java.io.IOException

sendOptionSubNegotiation

public void sendOptionSubNegotiation(int option,
                                     byte[] params)
                              throws java.io.IOException
Throws:
java.io.IOException

optionNegotiation

protected void optionNegotiation(int option,
                                 int request)
                          throws java.io.IOException
Throws:
java.io.IOException

interpretAsCommand

protected int interpretAsCommand(int cmd)