| java.lang.Object org.apache.openejb.webadmin.WebAdminBean
All known Subclasses: org.apache.openejb.webadmin.main.PropertiesBean, org.apache.openejb.webadmin.main.DeploymentListBean, org.apache.openejb.webadmin.clienttools.ViewJndiBean, org.apache.openejb.webadmin.main.HomeBean, org.apache.openejb.webadmin.clienttools.ViewEjbBean, org.apache.openejb.webadmin.main.ListLogsBean, org.apache.openejb.webadmin.clienttools.ViewClassBean, org.apache.openejb.webadmin.clienttools.InvokeObjectBean,
WebAdminBean | abstract public class WebAdminBean implements HttpBean(Code) | | This is the template web admin bean to extend from. It contains all the functionality for the webadministration. To use
this class, simply sub-class it:
public class MyBean extends WebAdminBean {
...
}
and declare the following methods:
public void ejbCreate() {}
public void preProcess(HttpRequest request, HttpResponse response) throws IOException {}
public void postProcess(HttpRequest request, HttpResponse response) throws IOException {}
public void writeBody(PrintWriter body) throws IOException {}
public void writeHtmlTitle(PrintWriter body) throws IOException {}
public void writePageTitle(PrintWriter body) throws IOException {}
public void writeSubMenuItems(PrintWriter body) throws IOException {}
author: David Blevins author: Tim Urberg |
Method Summary | |
public void | ejbActivate() called on a stateful sessionbean after the bean is
deserialized from storage and put back into use. | public void | ejbCreate() | public void | ejbPassivate() called on a stateful sessionbean before the bean is
removed from memory and serialized to a temporary store. | public void | ejbRemove() | public String | formatSubMenuItem(String itemName, String url) | public static String | getFooter() | public InputStream | getTemplate() | public HashMap | initNavSections() | public void | onMessage(HttpRequest request, HttpResponse response) | abstract public void | postProcess(HttpRequest request, HttpResponse response) | abstract public void | preProcess(HttpRequest request, HttpResponse response) | protected void | printRow(String col1, String col2, PrintWriter out) | protected void | printRow(String col1, String col2, String col3, PrintWriter out) | public void | setSessionContext(SessionContext sessionContext) | abstract public void | writeBody(PrintWriter body) writes the main body content to the broswer. | public void | writeFooter(PrintWriter body) | abstract public void | writeHtmlTitle(PrintWriter body) Write the TITLE of the HTML document. | public void | writeLeftNavBar(PrintWriter body) Write the left navigation bar of the page. | abstract public void | writePageTitle(PrintWriter body) Write the title of the page. | public void | writeTemplate(PrintWriter out, InputStream template) | public void | writeTopNavBar(PrintWriter body) Write the top navigation bar of the page. |
HTML_TITLE | final public static String HTML_TITLE(Code) | | the standard title
|
SUBSTITUTE | final public static int SUBSTITUTE(Code) | | the substitue
|
ejbContext | protected SessionContext ejbContext(Code) | | used for the session context
|
sections | public static HashMap sections(Code) | | the navigation sections
|
ejbActivate | public void ejbActivate()(Code) | | called on a stateful sessionbean after the bean is
deserialized from storage and put back into use.
|
ejbCreate | public void ejbCreate() throws CreateException(Code) | | called with the bean is created
throws: CreateException - if the bean cannot be created |
ejbPassivate | public void ejbPassivate()(Code) | | called on a stateful sessionbean before the bean is
removed from memory and serialized to a temporary store.
This method is never called on a stateless sessionbean
|
ejbRemove | public void ejbRemove()(Code) | | called when the bean is about to be garbage collected
|
formatSubMenuItem | public String formatSubMenuItem(String itemName, String url)(Code) | | formats a sub menu item for the left navigation
Parameters: itemName - the name for display Parameters: url - the url to link the html that is formatted |
getFooter | public static String getFooter()(Code) | | gets a footer for the document
the footer string |
getTemplate | public InputStream getTemplate() throws IOException(Code) | | gets an html template which is the content of the pages written to the browser
throws: IOException - if an exception is thrown the template |
initNavSections | public HashMap initNavSections()(Code) | | initalizes the left and top menu navigation
|
onMessage | public void onMessage(HttpRequest request, HttpResponse response) throws IOException(Code) | | the main method of this bean, it takes care of the processing
Parameters: request - the http request Parameters: response - the http response throws: IOException - if an exception is thrown |
postProcess | abstract public void postProcess(HttpRequest request, HttpResponse response) throws IOException(Code) | | called after all content is written to the browser
Parameters: request - the http request Parameters: response - the http response throws: IOException - if an exception is thrown |
preProcess | abstract public void preProcess(HttpRequest request, HttpResponse response) throws IOException(Code) | | called before any content is written to the browser
Parameters: request - the http request Parameters: response - the http response throws: IOException - if an exception is thrown |
printRow | protected void printRow(String col1, String col2, PrintWriter out) throws IOException(Code) | | prints a table row similar to this
<tr>
<td>some info</td>
<td>some more info</td>
</tr>
Parameters: col1 - the first column Parameters: col2 - the second column Parameters: out - the output to write to throws: IOException - if an exception is thrown |
printRow | protected void printRow(String col1, String col2, String col3, PrintWriter out) throws IOException(Code) | | prints a table row similar to this
<tr>
<td>some info</td>
<td>some more info</td>
<td>yet some more info</td>
</tr>
Parameters: col1 - the first column Parameters: col2 - the second column Parameters: col3 - the third column Parameters: out - the output to write to throws: IOException - if an exception is thrown |
setSessionContext | public void setSessionContext(SessionContext sessionContext)(Code) | | sets the session context
Parameters: sessionContext - the session context |
writeBody | abstract public void writeBody(PrintWriter body) throws IOException(Code) | | writes the main body content to the broswer. This content is inside a <p> block
Parameters: body - the output to write to exception: IOException - if an exception is thrown |
writeHtmlTitle | abstract public void writeHtmlTitle(PrintWriter body) throws IOException(Code) | | Write the TITLE of the HTML document. This is the part
that goes into the <head><title>
</title></head> tags
Parameters: body - the output to write to exception: IOException - of an exception is thrown |
writeLeftNavBar | public void writeLeftNavBar(PrintWriter body) throws IOException(Code) | | Write the left navigation bar of the page. This should look somthing
like the one below:
<tr>
<td valign="top" align="left">
<span class="subMenuOn">
Admin
</span>
</td>
</tr>
<tr>
<td valign="top" align="left">
<a href="system?show=status"><span class="subMenuOff">
Status
</span>
</a></td>
</tr>
<tr>
<<td valign="top" align="left">
<a href="system?show=deployments"><span class="subMenuOff">
Deployments
</span>
</a></td>
</tr>
Parameters: body - the output to write to exception: IOException - if an exception is thrown |
writePageTitle | abstract public void writePageTitle(PrintWriter body) throws IOException(Code) | | Write the title of the page. This is displayed right
above the main block of content.
Parameters: body - the output to write to exception: IOException - if an exception is thrown |
writeTemplate | public void writeTemplate(PrintWriter out, InputStream template) throws IOException(Code) | | writes a template from the input stream to the output stream
Parameters: out - the output to write to Parameters: template - the template to read throws: IOException - if an exception is thrown |
writeTopNavBar | public void writeTopNavBar(PrintWriter body) throws IOException(Code) | | Write the top navigation bar of the page. This should look somthing
like the one below:
<a href="system?show=server">
<span class="menuTopOff">Remote Server</span>
</a>
<a href="system?show=containers">
<span class="menuTopOff">Containers</span>
</a>
<a href="system?show=deployments">
<span class="menuTopOff">Deployments</span>
</a>
<a href="system?show=logs">
<span class="menuTopOff">Logs</span>
</a>
Parameters: body - the output to write to exception: IOException - if an exception is thrown |
|
|