JCas
v0.3.1

cas.protocol
Class JCasResponse

java.lang.Object
  extended bycas.protocol.JCasResponse

public class JCasResponse
extends Object

The response object for a request.

Version:
1.0
Author:
Ralph Schuster

Field Summary
static int ADDRESS_DOES_NOT_MATCH
           
static int AGENT_DOES_NOT_MATCH
           
static int BACKEND_ERROR
           
static int CANNOT_HANDLE_REQUEST
           
protected static String[] ERROR_TEXTS
          The error texts.
static int EXTENDED_AUTHORIZATION_FAILED
           
static int INTERNAL_SERVER_ERROR
           
static int INVALID_DOCUMENT
           
static int INVALID_USER
           
static int NO_SERVER_ERROR
           
static int NO_SUCH_SCHEME
           
static int OK_CODE
           
static String OK_MESSAGE
           
protected  Boolean rc
          The return value
protected  int rcCode
          The response code
protected  String rcMsg
          The response Message
static int REQUIRED_ROLE_MISSING
           
protected  Properties responseTags
          Additional responses
static int SUBNET_DOES_NOT_MATCH
           
static int UNKNOWN_COMMAND
           
static int USER_LOCKED
           
static int XML_NOT_WELL_FORMED
          Error messages
 
Constructor Summary
JCasResponse()
          Creates a new instance of JCasResponse
 
Method Summary
 void addResponseTag(String tagName, String value)
          Adds a specific response tag.
 boolean getRC()
          Returns the RC.
 int getResponseCode()
          Returns the response code.
 String getResponseMessage()
          Returns the response message.
 String getResponseTag(String tagName)
          Returns a specific response tag.
 Iterator getResponseTagIterator()
          Returns an iterator for the response tags.
 void set(boolean rc, int rcCode, String rcMsg)
          Sets the response.
protected  void set(boolean rc, String rcCode, String rcMsg)
          Sets the response.
 void setError(int code)
          Sets the error code and message.
 void setError(int code, String msg)
          Sets the error code and message.
 void setErrorDetails(int code, String details)
          Sets the error code and message.
 void setRC(boolean rc)
          Sets the return value.
 void setResponseCode(int code)
          Sets the response code.
 void setResponseMessage(String s)
          Sets the response message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rc

protected Boolean rc
The return value


rcCode

protected int rcCode
The response code


rcMsg

protected String rcMsg
The response Message


responseTags

protected Properties responseTags
Additional responses


XML_NOT_WELL_FORMED

public static final int XML_NOT_WELL_FORMED
Error messages

See Also:
Constant Field Values

INVALID_DOCUMENT

public static final int INVALID_DOCUMENT
See Also:
Constant Field Values

NO_SUCH_SCHEME

public static final int NO_SUCH_SCHEME
See Also:
Constant Field Values

UNKNOWN_COMMAND

public static final int UNKNOWN_COMMAND
See Also:
Constant Field Values

INTERNAL_SERVER_ERROR

public static final int INTERNAL_SERVER_ERROR
See Also:
Constant Field Values

CANNOT_HANDLE_REQUEST

public static final int CANNOT_HANDLE_REQUEST
See Also:
Constant Field Values

BACKEND_ERROR

public static final int BACKEND_ERROR
See Also:
Constant Field Values

NO_SERVER_ERROR

public static final int NO_SERVER_ERROR
See Also:
Constant Field Values

INVALID_USER

public static final int INVALID_USER
See Also:
Constant Field Values

ADDRESS_DOES_NOT_MATCH

public static final int ADDRESS_DOES_NOT_MATCH
See Also:
Constant Field Values

SUBNET_DOES_NOT_MATCH

public static final int SUBNET_DOES_NOT_MATCH
See Also:
Constant Field Values

AGENT_DOES_NOT_MATCH

public static final int AGENT_DOES_NOT_MATCH
See Also:
Constant Field Values

USER_LOCKED

public static final int USER_LOCKED
See Also:
Constant Field Values

REQUIRED_ROLE_MISSING

public static final int REQUIRED_ROLE_MISSING
See Also:
Constant Field Values

EXTENDED_AUTHORIZATION_FAILED

public static final int EXTENDED_AUTHORIZATION_FAILED
See Also:
Constant Field Values

OK_CODE

public static final int OK_CODE
See Also:
Constant Field Values

OK_MESSAGE

public static final String OK_MESSAGE
See Also:
Constant Field Values

ERROR_TEXTS

protected static final String[] ERROR_TEXTS
The error texts.

Constructor Detail

JCasResponse

public JCasResponse()
Creates a new instance of JCasResponse

Method Detail

setRC

public void setRC(boolean rc)
Sets the return value.


getRC

public boolean getRC()
Returns the RC.


setResponseCode

public void setResponseCode(int code)
Sets the response code.


getResponseCode

public int getResponseCode()
Returns the response code.


setResponseMessage

public void setResponseMessage(String s)
Sets the response message.


getResponseMessage

public String getResponseMessage()
Returns the response message.


set

protected void set(boolean rc,
                   String rcCode,
                   String rcMsg)
Sets the response.


set

public void set(boolean rc,
                int rcCode,
                String rcMsg)
Sets the response.


addResponseTag

public void addResponseTag(String tagName,
                           String value)
Adds a specific response tag.


getResponseTag

public String getResponseTag(String tagName)
Returns a specific response tag.


getResponseTagIterator

public Iterator getResponseTagIterator()
Returns an iterator for the response tags.


setError

public void setError(int code,
                     String msg)
Sets the error code and message.


setErrorDetails

public void setErrorDetails(int code,
                            String details)
Sets the error code and message.


setError

public void setError(int code)
Sets the error code and message.


JCas
v0.3.1