QuickServer
v1.4.7

org.quickserver.util.xmlreader
Class BasicServerConfig

java.lang.Object
  extended byorg.quickserver.util.xmlreader.BasicServerConfig
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
QSAdminServerConfig, QuickServerConfig

public class BasicServerConfig
extends java.lang.Object
implements java.io.Serializable

This class encapsulate the basic configuration of QuickServer.

Since:
1.2
Author:
Akshathkumar Shetty
See Also:
QuickServerConfig, QSAdminServerConfig, Serialized Form

Constructor Summary
BasicServerConfig()
           
 
Method Summary
 AccessConstraintConfig getAccessConstraintConfig()
          Returns Access constraints if present else null.
 AdvancedSettings getAdvancedSettings()
          Returns the AdvancedSettings for the QuickServer.
 java.lang.String getAuthenticator()
          Returns the Authenticator class that handles the authentication of the client.
 java.lang.String getBindAddr()
          Returns the Ip address binding to.
 java.lang.String getClientAuthenticationHandler()
          Returns the ClientAuthenticationHandler class that handles the authentication of the client.
 java.lang.String getClientBinaryHandler()
          Returns the ClientBinaryHandler class that interacts with client sockets.
 java.lang.String getClientCommandHandler()
          Returns the ClientCommandHandler class that interacts with client sockets.
 java.lang.String getClientData()
          Returns the ClientData class string that carries client data
 java.lang.String getClientEventHandler()
          Returns the ClientEventHandler class that gets notified of client events.
 java.lang.String getClientExtendedEventHandler()
          Returns the ClientExtendedEventHandler class that gets notified of client's extended events.
 java.lang.String getClientObjectHandler()
          Returns the ClientObjectHandler class that interacts with client sockets.
 java.lang.String getClientWriteHandler()
          Returns the ClientWriteHandler class that interacts with client sockets.
 boolean getCommunicationLogging()
          Returns the communication logging flag.
 java.lang.String getConsoleLoggingFormatter()
          Returns the console log handler level.
 java.lang.String getConsoleLoggingLevel()
          Returns the console log handler level.
 DefaultDataMode getDefaultDataMode()
          Returns the DefaultDataMode for the QuickServer.
 int getMaxAuthTry()
          Returns maximum allowed login attempts.
 java.lang.String getMaxAuthTryMsg()
          Returns message to be displayed when maximum allowed login attempts has reached.
 long getMaxConnection()
          Returns the maximum number of client connection allowed.
 java.lang.String getMaxConnectionMsg()
          Returns the message to be sent to any new client connected after maximum client connection has reached.
 java.lang.String getName()
          Returns the name of the QuickServer
 ObjectPoolConfig getObjectPoolConfig()
          Returns the ObjectPool Config object.
 int getPort()
          Returns the port for the QuickServer
 Secure getSecure()
          Returns Secure setting for QuickServer
 java.lang.String getServerBanner()
          Returns the Server Banner of the QuickServer
 ServerHooks getServerHooks()
          Returns ServerHooks if present else null.
 ServerMode getServerMode()
          Returns the ServerMode for the QuickServer.
 int getTimeout()
          Returns the Client Socket timeout in milliseconds.
 java.lang.String getTimeoutMsg()
          Returns timeout message.
 void setAccessConstraintConfig(AccessConstraintConfig accessConstraintConfig)
          Sets the Access constraints
 void setAdvancedSettings(AdvancedSettings advancedSettings)
          Sets the AdvancedSettings for the QuickServer.
 void setAuthenticator(Authenticator authenticator)
          Sets the Authenticator class that handles the authentication of the client.
 void setAuthenticator(java.lang.String authenticator)
          Sets the Authenticator class that handles the authentication of the client.
 void setBindAddr(java.lang.String bindAddr)
          Sets the Ip address to bind to.
 void setClientAuthenticationHandler(ClientAuthenticationHandler clientAuthenticationHandler)
          Sets the ClientAuthenticationHandler class that handles the authentication of the client.
 void setClientAuthenticationHandler(java.lang.String clientAuthenticationHandler)
          Sets the ClientAuthenticationHandler class that handles the authentication of the client.
 void setClientBinaryHandler(ClientBinaryHandler handler)
          Sets the ClientBinaryHandler class that interacts with client sockets.
 void setClientBinaryHandler(java.lang.String handler)
          Sets the ClientBinaryHandler class that interacts with client sockets.
 void setClientCommandHandler(ClientCommandHandler handler)
          Sets the ClientCommandHandler class that interacts with client sockets.
 void setClientCommandHandler(java.lang.String handler)
          Sets the ClientCommandHandler class that interacts with client sockets.
 void setClientData(ClientData data)
          Sets the ClientData class that carries client data.
 void setClientData(java.lang.String data)
          Sets the ClientData class that carries client data.
 void setClientEventHandler(ClientEventHandler handler)
          Sets the ClientEventHandler class that gets notified of client events.
 void setClientEventHandler(java.lang.String handler)
          Sets the ClientEventHandler class that gets notified of client events.
 void setClientExtendedEventHandler(ClientExtendedEventHandler handler)
          Sets the ClientExtendedEventHandler class that gets notified of client's extended events.
 void setClientExtendedEventHandler(java.lang.String handler)
          Sets the ClientExtendedEventHandler class that gets notified of client's extended events.
 void setClientObjectHandler(ClientObjectHandler handler)
          Sets the ClientObjectHandler class that interacts with client sockets.
 void setClientObjectHandler(java.lang.String handler)
          Sets the ClientObjectHandler class that interacts with client sockets.
 void setClientWriteHandler(ClientWriteHandler handler)
          Sets the ClientWriteHandler class that interacts with client sockets.
 void setClientWriteHandler(java.lang.String handler)
          Sets the ClientWriteHandler class that interacts with client sockets.
 void setCommunicationLogging(boolean enable)
          Sets the communication logging flag.
 void setConsoleLoggingFormatter(java.lang.String formatter)
          Sets the console log handler formatter.
 void setConsoleLoggingLevel(java.lang.String level)
          Sets the console log handler level.
 void setDefaultDataMode(DefaultDataMode defaultDataMode)
          Sets the DefaultDataMode for the QuickServer.
 void setMaxAuthTry(int authTry)
          Sets maximum allowed login attempts.
 void setMaxAuthTryMsg(java.lang.String msg)
          Sets message to be displayed when maximum allowed login attempts has reached.
 void setMaxConnection(long maxConnection)
          Sets the maximum number of client connection allowed..
 void setMaxConnectionMsg(java.lang.String maxConnectionMsg)
          Sets the message to be sent to any new client connected after maximum client connection has reached.
 void setName(java.lang.String name)
          Sets the name for the QuickServer.
 void setObjectPoolConfig(ObjectPoolConfig objectPoolConfig)
          Sets the ObjectPool Config object.
 void setPort(int port)
          Sets the port for the QuickServer to listen on.
 void setSecure(Secure secure)
          Sets the Secure setting for QuickServer
 void setServerBanner(java.lang.String banner)
          Sets the serverBanner for the QuickServer that will be displayed on the standard output [console] when server starts.
 void setServerHooks(ServerHooks serverHooks)
          Sets the ServerHooks
 void setServerMode(ServerMode serverMode)
          Sets the ServerMode for the QuickServer.
 void setTimeout(int time)
          Sets the Client Socket timeout in milliseconds.
 void setTimeoutMsg(java.lang.String msg)
          Sets timeout message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicServerConfig

public BasicServerConfig()
Method Detail

getName

public java.lang.String getName()
Returns the name of the QuickServer

See Also:
setName(java.lang.String)

setName

public void setName(java.lang.String name)
Sets the name for the QuickServer. XML Tag: <name></name>

Parameters:
name - for the QuickServer
See Also:
getName()

getServerBanner

public java.lang.String getServerBanner()
Returns the Server Banner of the QuickServer

See Also:
setServerBanner(java.lang.String)

setServerBanner

public void setServerBanner(java.lang.String banner)
Sets the serverBanner for the QuickServer that will be displayed on the standard output [console] when server starts. <br> <br> To set welcome message to your client ClientEventHandler.gotConnected(org.quickserver.net.server.ClientHandler) XML Tag: <server-banner></server-banner>

Parameters:
banner - for the QuickServer
See Also:
getServerBanner()

setPort

public void setPort(int port)
Sets the port for the QuickServer to listen on. If not set, it will run on Port 9876
XML Tag: <port></port>

Parameters:
port - to listen on.
See Also:
getPort()

getPort

public int getPort()
Returns the port for the QuickServer

See Also:
setPort(int)

setClientCommandHandler

public void setClientCommandHandler(java.lang.String handler)
Sets the ClientCommandHandler class that interacts with client sockets. XML Tag: <client-command-handler></client-command-handler>

Parameters:
handler - the fully qualified name of the class that implements ClientCommandHandler
See Also:
getClientCommandHandler()

setClientCommandHandler

public void setClientCommandHandler(ClientCommandHandler handler)
Sets the ClientCommandHandler class that interacts with client sockets.

Since:
1.4.6

getClientCommandHandler

public java.lang.String getClientCommandHandler()
Returns the ClientCommandHandler class that interacts with client sockets.

See Also:
setClientCommandHandler(java.lang.String)

setClientEventHandler

public void setClientEventHandler(java.lang.String handler)
Sets the ClientEventHandler class that gets notified of client events. XML Tag: <client-event-handler></client-event-handler>

Parameters:
handler - the fully qualified name of the class that implements ClientEventHandler
Since:
1.4.6
See Also:
getClientEventHandler()

setClientEventHandler

public void setClientEventHandler(ClientEventHandler handler)
Sets the ClientEventHandler class that gets notified of client events.

Since:
1.4.6

getClientEventHandler

public java.lang.String getClientEventHandler()
Returns the ClientEventHandler class that gets notified of client events.

Since:
1.4.6
See Also:
setClientEventHandler(java.lang.String)

setClientExtendedEventHandler

public void setClientExtendedEventHandler(java.lang.String handler)
Sets the ClientExtendedEventHandler class that gets notified of client's extended events. XML Tag: <client-extended-event-handler></client-extended-event-handler>

Parameters:
handler - the fully qualified name of the class that implements ClientExtendedEventHandler
Since:
1.4.6
See Also:
getClientExtendedEventHandler()

setClientExtendedEventHandler

public void setClientExtendedEventHandler(ClientExtendedEventHandler handler)
Sets the ClientExtendedEventHandler class that gets notified of client's extended events.

Since:
1.4.6

getClientExtendedEventHandler

public java.lang.String getClientExtendedEventHandler()
Returns the ClientExtendedEventHandler class that gets notified of client's extended events.

Since:
1.4.6
See Also:
setClientExtendedEventHandler(java.lang.String)

setAuthenticator

public void setAuthenticator(java.lang.String authenticator)
Sets the Authenticator class that handles the authentication of the client. XML Tag: <authenticator></authenticator>

Parameters:
authenticator - the fully qualified name of the class that implements Authenticator.
Since:
1.3
See Also:
getAuthenticator()

setAuthenticator

public void setAuthenticator(Authenticator authenticator)
Sets the Authenticator class that handles the authentication of the client.

Since:
1.4.6

getAuthenticator

public java.lang.String getAuthenticator()
Returns the Authenticator class that handles the authentication of the client.

Since:
1.3
See Also:
setAuthenticator(java.lang.String)

setClientAuthenticationHandler

public void setClientAuthenticationHandler(java.lang.String clientAuthenticationHandler)
Sets the ClientAuthenticationHandler class that handles the authentication of the client. XML Tag: <client-authentication-handler></client-authentication-handler>

Parameters:
clientAuthenticationHandler - the fully qualified name of the class that implements ClientAuthenticationHandler.
Since:
1.4.6
See Also:
getClientAuthenticationHandler()

setClientAuthenticationHandler

public void setClientAuthenticationHandler(ClientAuthenticationHandler clientAuthenticationHandler)
Sets the ClientAuthenticationHandler class that handles the authentication of the client.

Since:
1.4.6

getClientAuthenticationHandler

public java.lang.String getClientAuthenticationHandler()
Returns the ClientAuthenticationHandler class that handles the authentication of the client.

Since:
1.4.6
See Also:
setClientAuthenticationHandler(java.lang.String)

setClientData

public void setClientData(java.lang.String data)
Sets the ClientData class that carries client data. XML Tag: <client-data></client-data>

Parameters:
data - the fully qualified name of the class that extends ClientData.
See Also:
getClientData()

setClientData

public void setClientData(ClientData data)
Sets the ClientData class that carries client data.

Since:
1.4.6

getClientData

public java.lang.String getClientData()
Returns the ClientData class string that carries client data

Returns:
the fully qualified name of the class that implements ClientData.
See Also:
setClientData(java.lang.String)

setTimeout

public void setTimeout(int time)
Sets the Client Socket timeout in milliseconds. XML Tag: <timeout></timeout>

Parameters:
time - client socket timeout in milliseconds.
See Also:
getTimeout()

getTimeout

public int getTimeout()
Returns the Client Socket timeout in milliseconds.

See Also:
setTimeout(int)

setMaxAuthTry

public void setMaxAuthTry(int authTry)
Sets maximum allowed login attempts. XML Tag: <max-auth-try></max-auth-try>


getMaxAuthTry

public int getMaxAuthTry()
Returns maximum allowed login attempts. Default is : 5


setMaxAuthTryMsg

public void setMaxAuthTryMsg(java.lang.String msg)
Sets message to be displayed when maximum allowed login attempts has reached. Default is : -ERR Max Auth Try Reached
XML Tag: <max-auth-try-msg></max-auth-try-msg>

See Also:
getMaxAuthTryMsg()

getMaxAuthTryMsg

public java.lang.String getMaxAuthTryMsg()
Returns message to be displayed when maximum allowed login attempts has reached.

See Also:
getMaxAuthTryMsg()

setTimeoutMsg

public void setTimeoutMsg(java.lang.String msg)
Sets timeout message. Default is : -ERR Timeout
XML Tag: <timeout-msg></timeout-msg>

See Also:
getTimeoutMsg()

getTimeoutMsg

public java.lang.String getTimeoutMsg()
Returns timeout message.

See Also:
setTimeoutMsg(java.lang.String)

setMaxConnection

public void setMaxConnection(long maxConnection)
Sets the maximum number of client connection allowed.. XML Tag: <max-connection></max-connection>

See Also:
getMaxConnection()

getMaxConnection

public long getMaxConnection()
Returns the maximum number of client connection allowed.

See Also:
setMaxConnection(long)

setMaxConnectionMsg

public void setMaxConnectionMsg(java.lang.String maxConnectionMsg)
Sets the message to be sent to any new client connected after maximum client connection has reached. Default is : -ERR Server Busy. Max Connection Reached
XML Tag: <max-connection-msg></max-connection-msg>

See Also:
getMaxConnectionMsg()

getMaxConnectionMsg

public java.lang.String getMaxConnectionMsg()
Returns the message to be sent to any new client connected after maximum client connection has reached.

See Also:
setMaxConnectionMsg(java.lang.String)

setBindAddr

public void setBindAddr(java.lang.String bindAddr)
Sets the Ip address to bind to.

Parameters:
bindAddr - argument can be used on a multi-homed host for a QuickServer that will only accept connect requests to one of its addresses. If not set, it will default accepting connections on any/all local addresses. XML Tag: <bind-address></bind-address>
See Also:
getBindAddr()

getBindAddr

public java.lang.String getBindAddr()
Returns the Ip address binding to.

See Also:
setBindAddr(java.lang.String)

setClientObjectHandler

public void setClientObjectHandler(java.lang.String handler)
Sets the ClientObjectHandler class that interacts with client sockets. XML Tag: <client-object-handler></client-object-handler>

Parameters:
handler - object the fully qualified name of the class that implements ClientObjectHandler
See Also:
getClientObjectHandler()

setClientObjectHandler

public void setClientObjectHandler(ClientObjectHandler handler)
Sets the ClientObjectHandler class that interacts with client sockets.

Since:
1.4.6

getClientObjectHandler

public java.lang.String getClientObjectHandler()
Returns the ClientObjectHandler class that interacts with client sockets.

See Also:
setClientObjectHandler(java.lang.String)

setConsoleLoggingLevel

public void setConsoleLoggingLevel(java.lang.String level)
Sets the console log handler level. XML Tag: <console-logging-level></console-logging-level>

Parameters:
level - like INFO, FINE, CONFIG

getConsoleLoggingLevel

public java.lang.String getConsoleLoggingLevel()
Returns the console log handler level.


setConsoleLoggingFormatter

public void setConsoleLoggingFormatter(java.lang.String formatter)
Sets the console log handler formatter. XML Tag: <console-logging-formatter></console-logging-formatter>

Parameters:
formatter - fully qualified name of the class that implements Formatter

getConsoleLoggingFormatter

public java.lang.String getConsoleLoggingFormatter()
Returns the console log handler level.


setObjectPoolConfig

public void setObjectPoolConfig(ObjectPoolConfig objectPoolConfig)
Sets the ObjectPool Config object. XML Tag: <object-pool></object-pool>


getObjectPoolConfig

public ObjectPoolConfig getObjectPoolConfig()
Returns the ObjectPool Config object.


setCommunicationLogging

public void setCommunicationLogging(boolean enable)
Sets the communication logging flag.

Since:
1.3.2
See Also:
XML Tag: <communication-logging><enable>true</enable></communication-logging> Allowed values = true | false

getCommunicationLogging

public boolean getCommunicationLogging()
Returns the communication logging flag.

Since:
1.3.2
See Also:
setCommunicationLogging(boolean)

setAccessConstraintConfig

public void setAccessConstraintConfig(AccessConstraintConfig accessConstraintConfig)
Sets the Access constraints

Since:
1.3.3

getAccessConstraintConfig

public AccessConstraintConfig getAccessConstraintConfig()
Returns Access constraints if present else null.

Since:
1.3.3

setServerHooks

public void setServerHooks(ServerHooks serverHooks)
Sets the ServerHooks

Since:
1.3.3

getServerHooks

public ServerHooks getServerHooks()
Returns ServerHooks if present else null.

Since:
1.3.3

setSecure

public void setSecure(Secure secure)
Sets the Secure setting for QuickServer

Since:
1.4.0

getSecure

public Secure getSecure()
Returns Secure setting for QuickServer

Since:
1.4.0

setClientBinaryHandler

public void setClientBinaryHandler(java.lang.String handler)
Sets the ClientBinaryHandler class that interacts with client sockets. XML Tag: <client-binary-handler></client-binary-handler>

Parameters:
handler - the fully qualified name of the class that implements ClientBinaryHandler
See Also:
getClientBinaryHandler()

setClientBinaryHandler

public void setClientBinaryHandler(ClientBinaryHandler handler)
Sets the ClientBinaryHandler class that interacts with client sockets.

Since:
1.4.6

getClientBinaryHandler

public java.lang.String getClientBinaryHandler()
Returns the ClientBinaryHandler class that interacts with client sockets.

See Also:
setClientBinaryHandler(java.lang.String)

setServerMode

public void setServerMode(ServerMode serverMode)
Sets the ServerMode for the QuickServer.

Parameters:
serverMode - ServerMode object.
Since:
1.4.5
See Also:
getServerMode()

getServerMode

public ServerMode getServerMode()
Returns the ServerMode for the QuickServer.

Since:
1.4.5
See Also:
setServerMode(org.quickserver.util.xmlreader.ServerMode)

setClientWriteHandler

public void setClientWriteHandler(java.lang.String handler)
Sets the ClientWriteHandler class that interacts with client sockets. XML Tag: <client-write-handler></client-write-handler>

Parameters:
handler - the fully qualified name of the class that implements ClientWriteHandler
Since:
1.4.5
See Also:
getClientWriteHandler()

setClientWriteHandler

public void setClientWriteHandler(ClientWriteHandler handler)
Sets the ClientWriteHandler class that interacts with client sockets.

Since:
1.4.6

getClientWriteHandler

public java.lang.String getClientWriteHandler()
Returns the ClientWriteHandler class that interacts with client sockets.

See Also:
setClientWriteHandler(java.lang.String)

setAdvancedSettings

public void setAdvancedSettings(AdvancedSettings advancedSettings)
Sets the AdvancedSettings for the QuickServer.

Parameters:
advancedSettings - AdvancedSettings object.
Since:
1.4.5
See Also:
getAdvancedSettings()

getAdvancedSettings

public AdvancedSettings getAdvancedSettings()
Returns the AdvancedSettings for the QuickServer.

Since:
1.4.5
See Also:
setAdvancedSettings(org.quickserver.util.xmlreader.AdvancedSettings)

setDefaultDataMode

public void setDefaultDataMode(DefaultDataMode defaultDataMode)
Sets the DefaultDataMode for the QuickServer.

Parameters:
defaultDataMode - DefaultDataMode object.
Since:
1.4.6
See Also:
getDefaultDataMode()

getDefaultDataMode

public DefaultDataMode getDefaultDataMode()
Returns the DefaultDataMode for the QuickServer.

Since:
1.4.6
See Also:
setDefaultDataMode(org.quickserver.util.xmlreader.DefaultDataMode)

QuickServer
v1.4.7

Copyright © 2003-2006 QuickServer.org