JCas
v0.3.1

cas.protocol
Class JCasRequest

java.lang.Object
  extended bycas.xml.AbstractCasSaxTagHandler
      extended bycas.protocol.JCasRequest
All Implemented Interfaces:
CasSaxTagHandler

public class JCasRequest
extends AbstractCasSaxTagHandler

Request information object.

Version:
1.0
Author:
Ralph Schuster

Field Summary
protected  String agent
          The agent.
protected  String clientIP
          The client IP
protected  boolean closeCon
          Tells if the stored connection must be closed later.
protected  Boolean closeConnection
          Tells if the connection should be closed afterwards.
protected  Connection con
          The database connection used to process the rquest.
protected  String cookie
          The cookie
protected  JCasCookiesTag cookies
          The cookie tag handler responsible for this request
protected  InetAddress hostIP
          IP Address of the client host
static String NAME
          The name of the tag.
protected  String password
          The password
protected  String scheme
          The scheme
protected  String user
          The user
 
Constructor Summary
JCasRequest()
          Creates a new instance of JCasRequest
 
Method Summary
 void close()
          Closes the connection if necessary.
protected  AbstractCasSaxTagHandler createHandler(String tagName, Attributes attributes)
          Returns a new instance of the handler for the specified sub tag.
 String getAgent()
          Returns the agent.
 String getClientIP()
          Returns the client ip.
 boolean getCloseConnection()
          Returns if the connection should be closed.
 Connection getConnection()
          Returns the connection.
 String getCookie()
          Returns the cookie.
 JCasCookiesTag getCookies()
          Returns the responsiblke cookie handler.
 InetAddress getHostIP()
          Returns the host ip.
 String[] getParentTagNames()
          Returns the tag names of all possible parents.
 String getPassword()
          Returns the Password.
 String getScheme()
          Returns the scheme name.
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.
 String getUser()
          Returns the user.
 void removeCookie()
          Sets the cookie.
 void setConnection(Connection con, boolean close)
          Sets the connection of this request.
 void setCookies(JCasCookiesTag cookies)
          Sets the cookies tag handler.
 void setHostIP(InetAddress adr)
          Sets the host ip
 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

NAME

public static final String NAME
The name of the tag.

See Also:
Constant Field Values

scheme

protected String scheme
The scheme


agent

protected String agent
The agent.


user

protected String user
The user


password

protected String password
The password


cookie

protected String cookie
The cookie


clientIP

protected String clientIP
The client IP


closeConnection

protected Boolean closeConnection
Tells if the connection should be closed afterwards.


hostIP

protected InetAddress hostIP
IP Address of the client host


con

protected Connection con
The database connection used to process the rquest.


closeCon

protected boolean closeCon
Tells if the stored connection must be closed later.


cookies

protected JCasCookiesTag cookies
The cookie tag handler responsible for this request

Constructor Detail

JCasRequest

public JCasRequest()
Creates a new instance of JCasRequest

Method Detail

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.

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

getScheme

public String getScheme()
Returns the scheme name.


getAgent

public String getAgent()
Returns the agent.


getUser

public String getUser()
Returns the user.


getPassword

public String getPassword()
Returns the Password.


getCookie

public String getCookie()
Returns the cookie.


removeCookie

public void removeCookie()
Sets the cookie.


getClientIP

public String getClientIP()
Returns the client ip.


getCloseConnection

public boolean getCloseConnection()
Returns if the connection should be closed.


setHostIP

public void setHostIP(InetAddress adr)
Sets the host ip


getHostIP

public InetAddress getHostIP()
Returns the host ip.


setConnection

public void setConnection(Connection con,
                          boolean close)
Sets the connection of this request.

Parameters:
con - - connection
close - - true if the connection must be closed at the end of the request
See Also:
close()

getConnection

public Connection getConnection()
Returns the connection.


close

public void close()
Closes the connection if necessary.


setCookies

public void setCookies(JCasCookiesTag cookies)
Sets the cookies tag handler.


getCookies

public JCasCookiesTag getCookies()
Returns the responsiblke cookie handler.


JCas
v0.3.1