com.adventnet.html.dynamic
Class DynamicError

java.lang.Object
  extended by com.adventnet.html.dynamic.DynamicError
All Implemented Interfaces:
DynErrorInterface

public class DynamicError
extends java.lang.Object
implements DynErrorInterface

In the case of HTTP communcation, the displayed html page can be generated in two ways.

          1. Dynamic Html Page generation.

          2. Customized Html Page generation using SSI tags.

In the first case the user don't need to type any html file for his instrumentation. The HtmlMain and DynamicHtml classes will generate dynamic html files and take care of all the necessary operations like modify value, create value, etc.

In the second case, using the .shtml files generated from the MibCompiler that contains required ssi tags to display the instrumented information, the user can customize the html pages.

This class is the common class to handle both type of html generation. The servlet should create an instance of this class and invoke corresponding functions from here.

See Also:
com.adventnet.ssiparser.HtmlParser, com.adventnet.ssiparser.DynamicHtml

Field Summary
 int BAD_REQUEST
          HTTP error BAD_REQUES
 int CONFLICT
          HTTP error CONFLICT
 int FORBIDDEN
          HTTP error FORBIDDEN
 int METHOD_NOT_ALLOWED
          HTTP error METHOD_NOT_ALLOWED
 int NO_CONTENT
          HTTP error NO_CONTENT
 int NOT_AUTHORISED
          HTTP error NOT_AUTHORISED
 int NOT_FOUND
          HTTP error NOT_FOUND
 int OPER_ERROR
          Error for operation failed
 
Constructor Summary
DynamicError()
          Default Constructor for DynamicError
DynamicError(HtmlPageProp htmlPageProp)
           
 
Method Summary
 java.lang.String createErrorHtmlPage(int errno)
          Used generate html page for http error.
 java.lang.String createHtmlPage(java.lang.String message, java.lang.String heading)
           
 void generateErrorHtmlPage(java.lang.StringBuffer strBuf, int errno)
          Used generate html pages for http error.
 void generateMessage(java.lang.StringBuffer strBuf, java.lang.String message)
           
 java.lang.String getErrorMessage(int errno)
          Return the Http error message.
 java.lang.String getFileName()
           
 void setFileName(java.lang.String fileName)
           
 void setHtmlPageProp(HtmlPageProp htmlPageProp)
           
 void setParamName(java.lang.String paramName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_CONTENT

public int NO_CONTENT
HTTP error NO_CONTENT


BAD_REQUEST

public int BAD_REQUEST
HTTP error BAD_REQUES


FORBIDDEN

public int FORBIDDEN
HTTP error FORBIDDEN


NOT_FOUND

public int NOT_FOUND
HTTP error NOT_FOUND


METHOD_NOT_ALLOWED

public int METHOD_NOT_ALLOWED
HTTP error METHOD_NOT_ALLOWED


NOT_AUTHORISED

public int NOT_AUTHORISED
HTTP error NOT_AUTHORISED


OPER_ERROR

public int OPER_ERROR
Error for operation failed


CONFLICT

public int CONFLICT
HTTP error CONFLICT

Constructor Detail

DynamicError

public DynamicError()
Default Constructor for DynamicError


DynamicError

public DynamicError(HtmlPageProp htmlPageProp)
Method Detail

createErrorHtmlPage

public java.lang.String createErrorHtmlPage(int errno)
Used generate html page for http error.

Specified by:
createErrorHtmlPage in interface DynErrorInterface
Parameters:
errno - the http error number.
Returns:
the created http error html page.

setFileName

public void setFileName(java.lang.String fileName)
Specified by:
setFileName in interface DynErrorInterface

setHtmlPageProp

public void setHtmlPageProp(HtmlPageProp htmlPageProp)
Specified by:
setHtmlPageProp in interface DynErrorInterface

getFileName

public java.lang.String getFileName()

setParamName

public void setParamName(java.lang.String paramName)

generateErrorHtmlPage

public void generateErrorHtmlPage(java.lang.StringBuffer strBuf,
                                  int errno)
Used generate html pages for http error.

Parameters:
strBuf - the string buffer to store html tags.
errno - the http error number.

getErrorMessage

public java.lang.String getErrorMessage(int errno)
Return the Http error message.

Parameters:
errono - - the http error number.
Returns:
the http error message.

generateMessage

public void generateMessage(java.lang.StringBuffer strBuf,
                            java.lang.String message)

createHtmlPage

public java.lang.String createHtmlPage(java.lang.String message,
                                       java.lang.String heading)
Specified by:
createHtmlPage in interface DynErrorInterface