JCas
v0.3.1

cas.config
Class JCasServerTag

java.lang.Object
  extended bycas.xml.AbstractCasSaxTagHandler
      extended bycas.config.JCasServerTag
All Implemented Interfaces:
CasSaxTagHandler

public class JCasServerTag
extends AbstractCasSaxTagHandler

Configuration object for the system parameters.

Version:
1.0
Author:
Ralph Schuster

Field Summary
protected  Map admins
          The admin definitions
protected  List allowFrom
          The allowFrom definitions
protected  JCasBindTag bind
          The bind definition
static int DEFAULT_REQUEST_TIMEOUT
          default request timeout value
static long DEFAULT_THREAD_REQUEST_MAX
          default thread request value
static int DEFAULT_THREAD_SPARE_MAX
          default thread spare max value
static int DEFAULT_THREAD_SPARE_MIN
          default thread spare min value
static int DEFAULT_THREAD_START
          default thread start value
protected  String logfile
          The logfile
protected  File logFile
          The log file
protected static String NAME
          The tag name
protected static String[] parents
          The parents
protected  int requestTimeout
          request timeout definition
protected  String sslCertificateFile
          The SSL certificate file
protected  String sslKeyFile
          The SSL key file
protected  String sslKeyPassword
          The password for SSL key
protected  long threadRequestMax
          thread request definition
protected  int threadSpareMax
          thread spare max definition
protected  int threadSpareMin
          thread spare min definition
protected  int threadStart
          thread start definition
 
Constructor Summary
JCasServerTag()
          Creates a new instance of JCasServerTag
 
Method Summary
protected  AbstractCasSaxTagHandler createHandler(String tagName, Attributes attributes)
          Returns a new instance of the handler for the specified sub tag.
 List getAllowFrom()
          Returns the global allow from configs.
 String getBindAdress()
          Returns the bind adress.
 int getBindPort()
          Returns the bind port.
 File getLogfile()
          Returns the logfile.
 String[] getParentTagNames()
          Returns the tag names of all possible parents.
protected  String getPassword()
          Retrieves the password as intended.
 int getRequestTimeout()
          Returns the request timeout.
 boolean getSSL()
          Returns true if configuration wishes SSL protocol.
 String getSSLCertificateFile()
          Returns the path to server certificate.
 String getSSLKeyFile()
          Returns the path to private SSL key.
 char[] getSSLKeyPassword()
          Returns the password for private SSL key.
protected  String[] getSubTagNames()
          Returns the tag names that can appear within this handler but actually do not contain other tags.
 String getTagName()
          Returns the tag name this handler will take care of.
 long getThreadRequestMax()
          Returns the thread request max value.
 int getThreadSpareMax()
          Returns the thread spare max value.
 int getThreadSpareMin()
          Returns the thread spare min value.
 int getThreadStart()
          Returns the thread start value.
 void tagCompleted()
          Validates the configuration.
 
Methods inherited from class cas.xml.AbstractCasSaxTagHandler
characters, clear, endElement, getHandler, getSubHandler, getSubHandlerCount, getSubHandlers, getSubTag, getSubTag, getSubTagCount, getSubTags, ignoresUnknownTags, setAttributes, setIgnoreUnknownTags, startElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_THREAD_START

public static final int DEFAULT_THREAD_START
default thread start value

See Also:
Constant Field Values

DEFAULT_THREAD_SPARE_MIN

public static final int DEFAULT_THREAD_SPARE_MIN
default thread spare min value

See Also:
Constant Field Values

DEFAULT_THREAD_SPARE_MAX

public static final int DEFAULT_THREAD_SPARE_MAX
default thread spare max value

See Also:
Constant Field Values

DEFAULT_THREAD_REQUEST_MAX

public static final long DEFAULT_THREAD_REQUEST_MAX
default thread request value

See Also:
Constant Field Values

DEFAULT_REQUEST_TIMEOUT

public static final int DEFAULT_REQUEST_TIMEOUT
default request timeout value

See Also:
Constant Field Values

NAME

protected static String NAME
The tag name


parents

protected static String[] parents
The parents


bind

protected JCasBindTag bind
The bind definition


admins

protected Map admins
The admin definitions


allowFrom

protected List allowFrom
The allowFrom definitions


threadStart

protected int threadStart
thread start definition


threadSpareMin

protected int threadSpareMin
thread spare min definition


threadSpareMax

protected int threadSpareMax
thread spare max definition


threadRequestMax

protected long threadRequestMax
thread request definition


requestTimeout

protected int requestTimeout
request timeout definition


logfile

protected String logfile
The logfile


logFile

protected File logFile
The log file


sslKeyFile

protected String sslKeyFile
The SSL key file


sslKeyPassword

protected String sslKeyPassword
The password for SSL key


sslCertificateFile

protected String sslCertificateFile
The SSL certificate file

Constructor Detail

JCasServerTag

public JCasServerTag()
Creates a new instance of JCasServerTag

Method Detail

createHandler

protected AbstractCasSaxTagHandler createHandler(String tagName,
                                                 Attributes attributes)
Description copied from class: AbstractCasSaxTagHandler
Returns a new instance of the handler for the specified sub tag.

Specified by:
createHandler in class AbstractCasSaxTagHandler
Parameters:
tagName - - name of the sub tag
Returns:
new instance of sub tag handler or null

getParentTagNames

public String[] getParentTagNames()
Description copied from class: AbstractCasSaxTagHandler
Returns the tag names of all possible parents.

Specified by:
getParentTagNames in class AbstractCasSaxTagHandler
Returns:
- the tag names of possible parents

getSubTagNames

protected String[] getSubTagNames()
Description copied from class: AbstractCasSaxTagHandler
Returns the tag names that can appear within this handler but actually do not contain other tags.

Overrides:
getSubTagNames in class AbstractCasSaxTagHandler
Returns:
- all tag names that represent simple tags.

getTagName

public String getTagName()
Description copied from interface: CasSaxTagHandler
Returns the tag name this handler will take care of.

Returns:
- a tag name.

tagCompleted

public void tagCompleted()
                  throws SAXException
Description copied from class: AbstractCasSaxTagHandler
Validates the configuration. By default this method does nothing but handlers should override to check the values.

Specified by:
tagCompleted in interface CasSaxTagHandler
Overrides:
tagCompleted in class AbstractCasSaxTagHandler
Throws:
SAXException

getLogfile

public File getLogfile()
Returns the logfile.


getThreadStart

public int getThreadStart()
Returns the thread start value.


getThreadSpareMin

public int getThreadSpareMin()
Returns the thread spare min value.


getThreadSpareMax

public int getThreadSpareMax()
Returns the thread spare max value.


getThreadRequestMax

public long getThreadRequestMax()
Returns the thread request max value.


getRequestTimeout

public int getRequestTimeout()
Returns the request timeout.


getBindAdress

public String getBindAdress()
Returns the bind adress.


getBindPort

public int getBindPort()
Returns the bind port.


getAllowFrom

public List getAllowFrom()
Returns the global allow from configs.


getSSL

public boolean getSSL()
Returns true if configuration wishes SSL protocol.


getSSLKeyPassword

public char[] getSSLKeyPassword()
Returns the password for private SSL key.


getSSLKeyFile

public String getSSLKeyFile()
Returns the path to private SSL key.


getSSLCertificateFile

public String getSSLCertificateFile()
Returns the path to server certificate.


getPassword

protected String getPassword()
Retrieves the password as intended.


JCas
v0.3.1