Java Doc for WebAdminBean.java in  » J2EE » openejb3 » org » apache » openejb » webadmin » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » openejb3 » org.apache.openejb.webadmin 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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


Field Summary
final public static  StringHTML_TITLE
    
final public static  intSUBSTITUTE
    
protected  SessionContextejbContext
    
protected static  Stringfooter
    
protected  HttpRequestrequest
    
protected  HttpResponseresponse
    
protected  Stringsection
    
public static  HashMapsections
    


Method Summary
public  voidejbActivate()
     called on a stateful sessionbean after the bean is deserialized from storage and put back into use.
public  voidejbCreate()
    
public  voidejbPassivate()
     called on a stateful sessionbean before the bean is removed from memory and serialized to a temporary store.
public  voidejbRemove()
    
public  StringformatSubMenuItem(String itemName, String url)
    
public static  StringgetFooter()
    
public  InputStreamgetTemplate()
    
public  HashMapinitNavSections()
    
public  voidonMessage(HttpRequest request, HttpResponse response)
    
abstract public  voidpostProcess(HttpRequest request, HttpResponse response)
    
abstract public  voidpreProcess(HttpRequest request, HttpResponse response)
    
protected  voidprintRow(String col1, String col2, PrintWriter out)
    
protected  voidprintRow(String col1, String col2, String col3, PrintWriter out)
    
public  voidsetSessionContext(SessionContext sessionContext)
    
abstract public  voidwriteBody(PrintWriter body)
     writes the main body content to the broswer.
public  voidwriteFooter(PrintWriter body)
    
abstract public  voidwriteHtmlTitle(PrintWriter body)
     Write the TITLE of the HTML document.
public  voidwriteLeftNavBar(PrintWriter body)
     Write the left navigation bar of the page.
abstract public  voidwritePageTitle(PrintWriter body)
     Write the title of the page.
public  voidwriteTemplate(PrintWriter out, InputStream template)
    
public  voidwriteTopNavBar(PrintWriter body)
     Write the top navigation bar of the page.

Field Detail
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



footer
protected static String footer(Code)
the footer



request
protected HttpRequest request(Code)
the HTTP request



response
protected HttpResponse response(Code)
the HTTP response



section
protected String section(Code)
the menu section



sections
public static HashMap sections(Code)
the navigation sections





Method Detail
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



writeFooter
public void writeFooter(PrintWriter body) throws IOException(Code)
Write the footer
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



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.