thor.net
Interface TelnetTerminalHandler

All Known Implementing Classes:
DefaultTelnetTerminalHandler

public interface TelnetTerminalHandler

The TelnetTerminalHandler is the best way to communicate with the low levels that implement the Telnet protocol.

Whenever the host on the other end asks for an option to be turned on a getWantedOption will be called, you can decide then whether to turn on an option.

You must implement getOption and setOption honestly.

LineFeed, CarriageReturn, BackSpace, Null, FormFeed, Bell, VerticalTab, and HorizontalTab are called whenever those command are in the Telnet stream. They will not pass through as characters in the InputStream.

The LGPL applies to this software.
Unless otherwise stated the software is Copyright 1996,2000 Daniel Kristjansson


Method Summary
 void BackSpace()
          BackSpace
 void Bell()
          Rings Bell
 void CarriageReturn()
          CarriageReturn
 void ClearScreen()
          Clears Screen
 void FormFeed()
          Form Feed
 int[] getNotWantedOptions()
          Returns list of options no longer desired
 boolean getOption(int pnIndex)
          Tells asker if option is on
 int[] getWantedOptions()
          Returns list of options desired
 void HorizontalTab()
          Horizontal Tab -- normal tab
 boolean isNotWantedOption(int pnIndex)
          Tells asker if option is requested to be turned off
 boolean isWantedOption(int pnIndex)
          Tells asker if option is requested
 void LineFeed()
          Line Feed
 void Null()
          Null
 void OtherCommands(int command)
          Handles Other Commands -- SB, SE, DM, BRK, IP, AO, AYT, EC, EL, GA
 void removeNotWantedOption(int pnIndex)
          Remove option from the list of options no longer desired
 void removeWantedOption(int pnIndex)
          Remove option from the list of desired options
 void setOption(int pnIndex, boolean pbValue)
          Turns option on
 void VerticalTab()
          Vertical Tab
 

Method Detail

LineFeed

public void LineFeed()
Line Feed


CarriageReturn

public void CarriageReturn()
CarriageReturn


BackSpace

public void BackSpace()
BackSpace


Null

public void Null()
Null


FormFeed

public void FormFeed()
Form Feed


ClearScreen

public void ClearScreen()
Clears Screen


Bell

public void Bell()
Rings Bell


VerticalTab

public void VerticalTab()
Vertical Tab


HorizontalTab

public void HorizontalTab()
Horizontal Tab -- normal tab


OtherCommands

public void OtherCommands(int command)
Handles Other Commands -- SB, SE, DM, BRK, IP, AO, AYT, EC, EL, GA


getOption

public boolean getOption(int pnIndex)
Tells asker if option is on


setOption

public void setOption(int pnIndex,
                      boolean pbValue)
Turns option on


removeWantedOption

public void removeWantedOption(int pnIndex)
Remove option from the list of desired options


removeNotWantedOption

public void removeNotWantedOption(int pnIndex)
Remove option from the list of options no longer desired


isWantedOption

public boolean isWantedOption(int pnIndex)
Tells asker if option is requested


isNotWantedOption

public boolean isNotWantedOption(int pnIndex)
Tells asker if option is requested to be turned off


getWantedOptions

public int[] getWantedOptions()
Returns list of options desired


getNotWantedOptions

public int[] getNotWantedOptions()
Returns list of options no longer desired