QuickServer
v1.4.7

org.quickserver.net.qsadmin
Class QSAdminServer

java.lang.Object
  extended byorg.quickserver.net.qsadmin.QSAdminServer

public class QSAdminServer
extends java.lang.Object

QSAdminServer Main class.

This is can be used to setup a admin server to a QuickServer, it is implemented as a QuickServer. QuickServer comes with a very use full method QuickServer.startQSAdminServer(int, java.lang.String) that creates QSAdminServer associated with itself and starts it at the specified port or the default port 9877.

Since:
1.1
See Also:
startServer()

Constructor Summary
QSAdminServer(QuickServer controlServer)
          Creates QSAdminServer with default settings.
 
Method Summary
 java.lang.String getCommandPlugin()
          Returns the CommandPlugin class which plugs into CommandHandler of QsAdminServer,it will be null if not set.
 QuickServer getControlServer()
          Returns the QuickServer object that is being controled by this QSAdminServer.
 java.lang.String getPromptName()
          Gets the prompt name for QSAdminShell
 QuickServer getServer()
          Returns the QuickServer object that created it.
static java.lang.String getVersion()
           
 boolean isShellEnable()
          Returns flag indicated if command shell is enabled.
 void setAuthenticator(java.lang.String authenticator)
          Deprecated. since 1.4.6 use setClientAuthenticationHandler
 void setClientAuthenticationHandler(java.lang.String authenticator)
          Sets the ClientAuthenticationHandler class that handles the authentication of a client, if null uses default Authenticator.
 void setCommandPlugin(java.lang.String pluginClass)
          Sets the CommandPlugin class which plugs into CommandHandler of QsAdminServer.
 void setPromptName(java.lang.String promptName)
          Set the prompt name for QSAdminShell Default values = QSAdmin
 void setShellEnable(boolean flag)
          Sets the flag indicated if command shell is enabled.
 void startServer()
          Starts the QSAdminServer.
 void startServer(int port)
          Starts the QSAdminServer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QSAdminServer

public QSAdminServer(QuickServer controlServer)
Creates QSAdminServer with default settings. By default it has been set to allow only 1 client connection to it and binds to 127.0.0.1.

Parameters:
controlServer - QuickServer to control.
Method Detail

setAuthenticator

public void setAuthenticator(java.lang.String authenticator)
Deprecated. since 1.4.6 use setClientAuthenticationHandler

Sets the Authenticator class that handles the authentication of a client, if null uses default Authenticator.

Parameters:
authenticator - full class name of the class that implements Authenticator.
Since:
1.3

setClientAuthenticationHandler

public void setClientAuthenticationHandler(java.lang.String authenticator)
Sets the ClientAuthenticationHandler class that handles the authentication of a client, if null uses default Authenticator.

Parameters:
authenticator - full class name of the class that implements ClientAuthenticationHandler.
Since:
1.4.6

startServer

public void startServer(int port)
                 throws AppException
Starts the QSAdminServer.

Parameters:
port - to run QSAdminServer on
Throws:
AppException

startServer

public void startServer()
                 throws AppException
Starts the QSAdminServer. This method also sets the 'Store Objects' of QSAdminServer's QuickServer to the following
                POS 0 = QuickServer that is controled.
                POS 1 = Command Plugin if present for QSAdminServer's CommandHandler
                POS 3 = QSAdminServer own reference object. 

Throws:
AppException
Since:
1.2

getServer

public QuickServer getServer()
Returns the QuickServer object that created it.


getControlServer

public QuickServer getControlServer()
Returns the QuickServer object that is being controled by this QSAdminServer.


setCommandPlugin

public void setCommandPlugin(java.lang.String pluginClass)
                      throws java.lang.Exception
Sets the CommandPlugin class which plugs into CommandHandler of QsAdminServer. It should be set before QSAdminServer is started. Or QSAdminServer must be restarted.

Parameters:
pluginClass - the fully qualified name of the desired class that implements CommandPlugin
Throws:
if - could not load the class
java.lang.Exception
Since:
1.2

getCommandPlugin

public java.lang.String getCommandPlugin()
Returns the CommandPlugin class which plugs into CommandHandler of QsAdminServer,it will be null if not set.

Since:
1.2

getVersion

public static java.lang.String getVersion()

isShellEnable

public boolean isShellEnable()
Returns flag indicated if command shell is enabled.

Since:
1.3.2

setShellEnable

public void setShellEnable(boolean flag)
Sets the flag indicated if command shell is enabled.

Since:
1.3.2

setPromptName

public void setPromptName(java.lang.String promptName)
Set the prompt name for QSAdminShell Default values = QSAdmin

Since:
1.3.2

getPromptName

public java.lang.String getPromptName()
Gets the prompt name for QSAdminShell

Since:
1.3.2

QuickServer
v1.4.7

Copyright © 2003-2006 QuickServer.org