JCas
v0.3.1

cas.config
Class JCasConfiguration

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

public class JCasConfiguration
extends AbstractCasSaxTagHandler

Main configuration object of a server.

Version:
1.0
Author:
Ralph Schuster

Field Summary
protected  CookieManager cookieManager
          The cookie manager
protected  JCasCookiesTag cookiesTag
          The cookies definition found
protected  Map instances
          The instances definition
protected static String NAME
          The tag name
protected  Map schemes
          The schemes
protected  JCasServerTag serverTag
          The server definition
 
Constructor Summary
JCasConfiguration()
          Creates a new instance of JCasConfiguration
 
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.
 CookieManager getCookieManager()
          Returns the cookie manager.
 JCasCookiesTag getCookies()
          Returns the cookies.
 JCasInstanceTag getInstance(JCasSchemeTag scheme)
          Returns an instance definition.
 JCasInstanceTag getInstance(String name)
          Returns an instance definition.
 String[] getParentTagNames()
          Returns the tag names of all possible parents.
 int getRequestTimeout()
          Returns the request timeout.
 JCasSchemeTag getScheme(String name)
          Returns a scheme definition.
 File getServerLogFile()
          Returns the server log file.
 File getServerLogFile(String scheme)
          Returns the server log file.
 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.
 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, getSubTagNames, 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

NAME

protected static String NAME
The tag name


cookiesTag

protected JCasCookiesTag cookiesTag
The cookies definition found


serverTag

protected JCasServerTag serverTag
The server definition


instances

protected Map instances
The instances definition


schemes

protected Map schemes
The schemes


cookieManager

protected CookieManager cookieManager
The cookie manager

Constructor Detail

JCasConfiguration

public JCasConfiguration()
Creates a new instance of JCasConfiguration

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

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

getInstance

public JCasInstanceTag getInstance(String name)
Returns an instance definition.


getInstance

public JCasInstanceTag getInstance(JCasSchemeTag scheme)
Returns an instance definition.


getScheme

public JCasSchemeTag getScheme(String name)
Returns a scheme definition.


getServerLogFile

public File getServerLogFile()
Returns the server log file.


getServerLogFile

public File getServerLogFile(String scheme)
Returns the server log file.


getBindAdress

public String getBindAdress()
Returns the bind adress.


getBindPort

public int getBindPort()
Returns the bind port.


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.


getAllowFrom

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


getCookieManager

public CookieManager getCookieManager()
Returns the cookie manager.


getCookies

public JCasCookiesTag getCookies()
Returns the cookies.


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.


JCas
v0.3.1