net.wimpi.telnetd.io.terminal
Class TerminalManager

java.lang.Object
  extended by net.wimpi.telnetd.io.terminal.TerminalManager

public class TerminalManager
extends java.lang.Object

Class that manages all available terminal implementations.
Configuration is stored in a properties file (normally Terminals.properties).

Version:
2.0 (16/07/2006)
Author:
Dieter Wimberger

Method Summary
static TerminalManager createTerminalManager(java.util.Map terminals, boolean winhack)
          sets up a terminal manager with a ready made hashmap of terminals.
static TerminalManager createTerminalManager(java.util.Properties settings)
          Factory method for creating the Singleton instance of this class.
Note that this factory method is called by the net.wimpi.telnetd.TelnetD class.
 java.lang.String[] getAvailableTerminals()
           
static TerminalManager getReference()
          Accessor method for the Singleton instance of this class.
Note that it returns null if the instance was not properly created beforehand.
 Terminal getTerminal(java.lang.String key)
          Returns a reference to a terminal that has been set up, regarding to the key given as parameter.
If the key does not represent a terminal name or any alias for any terminal, then the returned terminal will be a default basic terminal (i.e.
 java.util.HashMap getTerminals()
           
 void setTerminals(java.util.HashMap terminals)
           
 void setWindoofHack(boolean b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTerminal

public Terminal getTerminal(java.lang.String key)
Returns a reference to a terminal that has been set up, regarding to the key given as parameter.
If the key does not represent a terminal name or any alias for any terminal, then the returned terminal will be a default basic terminal (i.e. vt100 without color support).

Parameters:
key - String that represents a terminal name or an alias.
Returns:
Terminal instance or null if the key was invalid.

getAvailableTerminals

public java.lang.String[] getAvailableTerminals()

setWindoofHack

public void setWindoofHack(boolean b)

createTerminalManager

public static TerminalManager createTerminalManager(java.util.Properties settings)
                                             throws BootException
Factory method for creating the Singleton instance of this class.
Note that this factory method is called by the net.wimpi.telnetd.TelnetD class.

Parameters:
settings - Properties defining the terminals as described in the class documentation.
Returns:
TerminalManager Singleton instance.
Throws:
BootException

createTerminalManager

public static TerminalManager createTerminalManager(java.util.Map terminals,
                                                    boolean winhack)
                                             throws BootException
sets up a terminal manager with a ready made hashmap of terminals.

Parameters:
terminals: - hashmap of terminal classes with their alias names
winhack: - is this a windoof hack
Throws:
BootException

getReference

public static TerminalManager getReference()
Accessor method for the Singleton instance of this class.
Note that it returns null if the instance was not properly created beforehand.

Returns:
TerminalManager Singleton instance reference.

getTerminals

public java.util.HashMap getTerminals()

setTerminals

public void setTerminals(java.util.HashMap terminals)


Copyright © 2010. All Rights Reserved.