to.etc.dbpool.info
Class JspPageHandler

java.lang.Object
  extended by to.etc.dbpool.info.JspPageHandler

public class JspPageHandler
extends java.lang.Object

Helper class to reduce the horrible code in pool.jsp, without having to copy multiple parts.

Author:
Frits Jalvingh Created on Nov 11, 2010

Constructor Summary
JspPageHandler(javax.servlet.jsp.JspWriter out, javax.servlet.http.HttpServletRequest request, java.lang.String jspname)
           
 
Method Summary
 void actionClearglobal()
           
 void actionErrorsoff()
           
 void actionErrorson()
           
 void actionForceexpired()
           
 void actionSessionoff()
           
 void actionSessionon()
           
 void actionTag(ConnectionPool pool, java.lang.String action, java.lang.String text)
           
 void actionTraceoff()
           
 void actionTraceon()
          Switch on tracing if disabled.
 void addError(java.lang.String msg)
           
 void addMessage(java.lang.String msg)
           
 void atag(java.lang.String contents, java.lang.String... args)
           
 JspPageHandler attr(java.lang.String name, java.lang.String value)
           
 void backlink()
           
 void displayPage()
           
 void etag(java.lang.String name)
           
 void expandTemplate(java.lang.String name, java.lang.Object... values)
          Expand a fragment template.
 void expandTemplate2(java.lang.String name, java.lang.Object... values)
           
 JspPageHandler full(java.lang.String name, java.lang.String... attr)
           
 void generateRefresh()
          Called from page to generate the refresh tag if needed.
 java.lang.String getMessage()
           
 javax.servlet.jsp.JspWriter getOut()
           
 ConnectionPool getPool()
           
 javax.servlet.http.HttpServletRequest getRequest()
           
 void h1(java.lang.String text)
           
 void initialize()
          Decode all parameters and define the action to take.
 JspPageHandler nl()
           
 long now()
           
 java.lang.String odd()
           
 void showGloballist()
           
 void showGlobalstats()
          Show statistics page displaying the list of all available statistics.
 void showHanging()
          Displays all currently hanging connections as an expandable thingerydoo
 void showIndex()
          Root page code- show all available pools.
 void showSession()
          Show the list of request traces in the session structure.
 void showSessionstat()
           
 void showTag(ConnectionPool pool, java.lang.String action, java.lang.String text)
           
 void showUsed()
          Displays all currently used connections as an expandable thingerydoo
 void tag(java.lang.String name, java.lang.String... attr)
          Generate an html tag and any optional attributes.
 JspPageHandler tagText(java.lang.String tag, java.lang.String text, java.lang.String... attr)
           
 JspPageHandler text(java.lang.String text)
           
 void write(java.lang.String s)
           
 void writeExpr(java.lang.Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JspPageHandler

public JspPageHandler(javax.servlet.jsp.JspWriter out,
                      javax.servlet.http.HttpServletRequest request,
                      java.lang.String jspname)
Method Detail

getOut

public javax.servlet.jsp.JspWriter getOut()

getRequest

public javax.servlet.http.HttpServletRequest getRequest()

getPool

public ConnectionPool getPool()

getMessage

public java.lang.String getMessage()

addMessage

public void addMessage(java.lang.String msg)

addError

public void addError(java.lang.String msg)

initialize

public void initialize()
                throws java.lang.Exception
Decode all parameters and define the action to take.

Throws:
java.lang.Exception

displayPage

public void displayPage()
                 throws java.lang.Exception
Throws:
java.lang.Exception

generateRefresh

public void generateRefresh()
                     throws java.io.IOException
Called from page to generate the refresh tag if needed.

Throws:
java.io.IOException

tag

public void tag(java.lang.String name,
                java.lang.String... attr)
         throws java.io.IOException
Generate an html tag and any optional attributes.

Parameters:
name -
attr -
Throws:
java.io.IOException

etag

public void etag(java.lang.String name)
          throws java.io.IOException
Throws:
java.io.IOException

full

public JspPageHandler full(java.lang.String name,
                           java.lang.String... attr)
                    throws java.io.IOException
Throws:
java.io.IOException

text

public JspPageHandler text(java.lang.String text)
                    throws java.io.IOException
Throws:
java.io.IOException

tagText

public JspPageHandler tagText(java.lang.String tag,
                              java.lang.String text,
                              java.lang.String... attr)
                       throws java.io.IOException
Throws:
java.io.IOException

nl

public JspPageHandler nl()
                  throws java.io.IOException
Throws:
java.io.IOException

attr

public JspPageHandler attr(java.lang.String name,
                           java.lang.String value)
                    throws java.io.IOException
Throws:
java.io.IOException

h1

public void h1(java.lang.String text)
        throws java.io.IOException
Throws:
java.io.IOException

actionTag

public void actionTag(ConnectionPool pool,
                      java.lang.String action,
                      java.lang.String text)
               throws java.io.IOException
Throws:
java.io.IOException

showTag

public void showTag(ConnectionPool pool,
                    java.lang.String action,
                    java.lang.String text)
             throws java.io.IOException
Throws:
java.io.IOException

atag

public void atag(java.lang.String contents,
                 java.lang.String... args)
          throws java.io.IOException
Throws:
java.io.IOException

backlink

public void backlink()
              throws java.io.IOException
Throws:
java.io.IOException

odd

public java.lang.String odd()

now

public long now()

actionTraceon

public void actionTraceon()
                   throws java.lang.Exception
Switch on tracing if disabled.

Throws:
java.lang.Exception

actionTraceoff

public void actionTraceoff()
                    throws java.lang.Exception
Throws:
java.lang.Exception

actionErrorson

public void actionErrorson()
                    throws java.lang.Exception
Throws:
java.lang.Exception

actionErrorsoff

public void actionErrorsoff()
                     throws java.lang.Exception
Throws:
java.lang.Exception

actionSessionon

public void actionSessionon()
                     throws java.lang.Exception
Throws:
java.lang.Exception

actionSessionoff

public void actionSessionoff()
                      throws java.lang.Exception
Throws:
java.lang.Exception

actionForceexpired

public void actionForceexpired()
                        throws java.lang.Exception
Throws:
java.lang.Exception

actionClearglobal

public void actionClearglobal()
                       throws java.lang.Exception
Throws:
java.lang.Exception

expandTemplate

public void expandTemplate(java.lang.String name,
                           java.lang.Object... values)
                    throws java.lang.Exception
Expand a fragment template.

Parameters:
name -
values -
Throws:
java.io.IOException
java.lang.Exception

expandTemplate2

public void expandTemplate2(java.lang.String name,
                            java.lang.Object... values)
                     throws java.lang.Exception
Throws:
java.lang.Exception

write

public void write(java.lang.String s)
           throws java.io.IOException
Throws:
java.io.IOException

writeExpr

public void writeExpr(java.lang.Object o)
               throws java.io.IOException
Throws:
java.io.IOException

showIndex

public void showIndex()
               throws java.lang.Exception
Root page code- show all available pools.

Throws:
java.io.IOException
java.lang.Exception

showHanging

public void showHanging()
                 throws java.lang.Exception
Displays all currently hanging connections as an expandable thingerydoo

Throws:
java.lang.Exception

showUsed

public void showUsed()
              throws java.lang.Exception
Displays all currently used connections as an expandable thingerydoo

Throws:
java.lang.Exception

showGlobalstats

public void showGlobalstats()
                     throws java.lang.Exception
Show statistics page displaying the list of all available statistics.

Throws:
java.lang.Exception

showGloballist

public void showGloballist()
                    throws java.lang.Exception
Throws:
java.lang.Exception

showSession

public void showSession()
                 throws java.lang.Exception
Show the list of request traces in the session structure.

Throws:
java.lang.Exception

showSessionstat

public void showSessionstat()
                     throws java.lang.Exception
Throws:
java.lang.Exception