net.wimpi.telnetd
Class TelnetD

java.lang.Object
  extended by net.wimpi.telnetd.TelnetD

public class TelnetD
extends java.lang.Object

Class that implements a configurable and embeddable telnet daemon.

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

Field Summary
static org.apache.commons.logging.Log debuglog
           
static org.apache.commons.logging.Log syslog
           
 
Method Summary
static TelnetD createTelnetD()
          creates an independant instance of the telnetd object, no setup.
static TelnetD createTelnetD(java.util.Properties main)
          Factory method to create a TelnetD Instance.
static TelnetD createTelnetD(java.lang.String urlprefix)
          Factory method to create a TelnetD singleton instance, loading the standard properties files from the given String containing an URL location.
 java.util.List getListeners()
           
 PortListener getPortListener(java.lang.String id)
          Returns a PortListener for the given identifier.
static TelnetD getReference()
          Accessor method for the Singleton instance of this class.
 ShellManager getShellManager()
           
 java.lang.String getVersion()
          Accessor method to version information.
static void main(java.lang.String[] args)
          Implements a test startup of an example server.
 void setListeners(java.util.List listeners)
           
 void setShellManager(ShellManager shellManager)
           
 void start()
          Start this telnet daemon, respectively all configured listeners.
 void stop()
          Stop this telnet daemon, respectively all configured listeners.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debuglog

public static org.apache.commons.logging.Log debuglog

syslog

public static org.apache.commons.logging.Log syslog
Method Detail

start

public void start()
Start this telnet daemon, respectively all configured listeners.


stop

public void stop()
Stop this telnet daemon, respectively all configured listeners.


getVersion

public java.lang.String getVersion()
Accessor method to version information.

Returns:
String that contains version information.

getPortListener

public PortListener getPortListener(java.lang.String id)
Returns a PortListener for the given identifier.

Parameters:
id - the identifier of the PortListener instance.
Returns:
PortListener instance or null if an instance with the given identifier does not exist.

createTelnetD

public static TelnetD createTelnetD(java.util.Properties main)
                             throws BootException
Factory method to create a TelnetD Instance.

Parameters:
main - Properties object with settings for the TelnetD.
Returns:
TenetD instance that has been properly set up according to the passed in properties, and is ready to start serving.
Throws:
BootException - if the setup process fails.

createTelnetD

public static TelnetD createTelnetD(java.lang.String urlprefix)
                             throws BootException
Factory method to create a TelnetD singleton instance, loading the standard properties files from the given String containing an URL location.

Parameters:
urlprefix - String containing an URL prefix.
Returns:
TenetD instance that has been properly set up according to the passed in properties, and is ready to start serving.
Throws:
BootException - if the setup process fails.

createTelnetD

public static TelnetD createTelnetD()
creates an independant instance of the telnetd object, no setup.


getReference

public static TelnetD getReference()
Accessor method for the Singleton instance of this class.

Returns:
TelnetD Singleton instance reference.

main

public static void main(java.lang.String[] args)
Implements a test startup of an example server. It is supposed to demonstrate the easy deployment, and usage of this daemon.
Usage:
java net.wimpi.telnetd.TelnetD [URL prefix pointing to properties]

Parameters:
args - String array containing arguments.

getListeners

public java.util.List getListeners()

setListeners

public void setListeners(java.util.List listeners)

getShellManager

public ShellManager getShellManager()

setShellManager

public void setShellManager(ShellManager shellManager)


Copyright © 2010. All Rights Reserved.