Menu

#25 Allow telnetd.properties to configure constructed shells

open
nobody
None
5
2009-01-08
2009-01-08
No

While available shells are configured through telnetd.properties, there appears to currently be no way to specify properties for the constructed shell objects. This would be advantageous when using a shell class with multiple, concurrent TelnetD server instances.

This could probably be done by allowing the <ShellClass>.createShell method to accept properties that apply to that shell, as configured in the telnetd.properties. This should probably be made optional for compatibility.

Discussion

  • Alan Krueger

    Alan Krueger - 2009-01-08

    I've attached a suggested patch to do what I've described. In the properties supplied to the TelnetD object, you can specify the following:

    shells=<shells>
    shell.<name>.class=<classname>
    shell.<name>.<propertyname1>=<propertyvalue1>
    shell.<name>.<propertyname2>=<propertyvalue2>
    shell.<name>.<propertyname3>=<propertyvalue3>
    ...

    where <name> is the name of the shell. When the specified shell class is constructed, if the createShell method has a single Properties argument, it will receive a Properties object containing the following:

    <propertyname1>=<propertyvalue1>
    <propertyname2>=<propertyvalue2>
    <propertyname3>=<propertyvalue3>
    ...

    If the createShell method has no arguments, it will be called without the properties.

     
  • Alan Krueger

    Alan Krueger - 2009-01-08

    suggested patch

     

Log in to post a comment.

MongoDB Logo MongoDB