|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.felix.webconsole.AbstractWebConsolePlugin
org.apache.felix.ipojo.webconsole.IPOJOServlet
public class IPOJOServlet
iPOJO Plugin for the web console.
| Nested Class Summary | |
|---|---|
private class |
IPOJOServlet.RequestInfo
|
| Field Summary | |
|---|---|
static java.lang.String |
ALL
All constant. |
static java.lang.String |
FACTORY
Factory constant. |
static java.lang.String |
HANDLER
Handler constant. |
static java.lang.String |
INSTANCE
Instance constant. |
private java.util.List<Architecture> |
m_archs
List of available Architecture service. |
private java.util.List<Factory> |
m_factories
List of available Factories. |
private java.util.List<HandlerFactory> |
m_handlers
List of available Handler Factories. |
private java.lang.String |
m_label
Label used by the web console. |
private java.lang.String |
m_title
Title used by the web console. |
private static long |
serialVersionUID
UUID. |
| Fields inherited from class org.apache.felix.webconsole.AbstractWebConsolePlugin |
|---|
ATTR_FILEUPLOAD |
| Constructor Summary | |
|---|---|
IPOJOServlet(org.osgi.framework.BundleContext bc)
Creates a IPOJOServlet. |
|
| Method Summary | |
|---|---|
private void |
addEntry(java.io.PrintWriter pw,
java.lang.String header,
java.lang.String value)
Adds a line into a key / value table. |
private java.lang.String |
addEntry(java.lang.String header,
java.lang.String value)
Gets the HTML code of a key / value table row. |
private static java.lang.String |
getDependencyBindingPolicy(int policy)
Gets the dependency binding policy as a String. |
private static java.lang.String |
getDependencyState(int state)
Gets the dependency state as a String. |
private java.lang.String |
getFactoryLinkIfPossible(InstanceDescription id)
Gets the factory link if the factory exists. |
private static java.lang.String |
getFactoryState(int state)
Gets the factory state as a String. |
private InstanceDescription |
getInstanceDescriptionByName(java.lang.String name)
Gets the instance description by name. |
private java.lang.String |
getInstanceLink(java.lang.String name)
Gets the HTML link targeting this instance. |
private java.lang.String |
getInstanceList(java.lang.String factory)
Gets the instance list created by the given factory. |
private static java.lang.String |
getInstanceState(int state)
Gets the instance state as a String. |
private int |
getInvalidCount()
Gets the number of invalid instances. |
private java.lang.String |
getInvalidHandlerList(HandlerDescription[] hl)
Gets the list of invalid handler. |
java.lang.String |
getLabel()
Gets the plugin label. |
private java.lang.String |
getProperties(PropertyDescription[] properties)
Gets component type properties HTML table. |
private java.lang.String |
getProvidedServiceDetail(HandlerDescription hd)
Gets provided service details. |
private static java.lang.String |
getProvidedServiceState(int state)
Gets the provided service state as a String. |
private java.lang.String |
getRequiredServiceDetail(HandlerDescription hd)
Gets required service details. |
private java.lang.String |
getServiceProperties(java.util.Properties properties)
Gets the HTML list of service properties. |
private java.lang.String |
getServiceReferenceList(java.util.List<org.osgi.framework.ServiceReference> refs)
Gets the HTML list containing service references. |
java.lang.String |
getTitle()
Gets the plugin title. |
private int |
getValidCount()
Gets the number of valid instances. |
private void |
printFactoryDetail(java.io.PrintWriter pw,
java.lang.String name)
Gets a Factory Detail page. |
private void |
printFactoryList(java.io.PrintWriter pw)
Prints the factory list. |
private void |
printHandlerList(java.io.PrintWriter pw)
Print the handler list. |
private void |
printInstanceDetail(java.io.PrintWriter pw,
java.lang.String name)
Gets the page containing instance detail. |
private void |
printInstanceList(java.io.PrintWriter pw)
Gets the instance list page. |
protected void |
renderContent(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Gets the HTML content of the plugin. |
void |
stop()
Stop method. |
| Methods inherited from class org.apache.felix.webconsole.AbstractWebConsolePlugin |
|---|
activate, deactivate, doGet, endResponse, getBundleContext, getParameter, getServletName, renderTopNavigation, sendRedirect, startResponse |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, init, init, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String FACTORY
public static final java.lang.String INSTANCE
public static final java.lang.String HANDLER
public static final java.lang.String ALL
private static final long serialVersionUID
private java.lang.String m_label
private java.lang.String m_title
private java.util.List<Architecture> m_archs
private java.util.List<Factory> m_factories
private java.util.List<HandlerFactory> m_handlers
| Constructor Detail |
|---|
public IPOJOServlet(org.osgi.framework.BundleContext bc)
bc - the bundle context| Method Detail |
|---|
public void stop()
public java.lang.String getLabel()
getLabel in class org.apache.felix.webconsole.AbstractWebConsolePluginAbstractWebConsolePlugin.getLabel()public java.lang.String getTitle()
getTitle in class org.apache.felix.webconsole.AbstractWebConsolePluginAbstractWebConsolePlugin.getTitle()private int getValidCount()
private int getInvalidCount()
protected void renderContent(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
renderContent in class org.apache.felix.webconsole.AbstractWebConsolePluginreq - the requestres - the response
javax.servlet.ServletException - if the content cannot be computed
java.io.IOException - if an IO Exception occursAbstractWebConsolePlugin.renderContent(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
private void printFactoryDetail(java.io.PrintWriter pw,
java.lang.String name)
pw - the writername - the name of the factoryprivate java.lang.String getProperties(PropertyDescription[] properties)
properties - the properties to display
private void printInstanceList(java.io.PrintWriter pw)
pw - the writer
private void addEntry(java.io.PrintWriter pw,
java.lang.String header,
java.lang.String value)
pw - the writerheader - the keyvalue - the value (may be HTML code)
private java.lang.String addEntry(java.lang.String header,
java.lang.String value)
header - the keyvalue - the value (may be HTML code)
private java.lang.String getFactoryLinkIfPossible(InstanceDescription id)
id - the factory name
private java.lang.String getInvalidHandlerList(HandlerDescription[] hl)
hl - the handler description list.
private void printInstanceDetail(java.io.PrintWriter pw,
java.lang.String name)
pw - the writername - the instance nameprivate java.lang.String getInstanceLink(java.lang.String name)
name - the instance name
private java.lang.String getServiceProperties(java.util.Properties properties)
properties - the properties
private java.lang.String getInstanceList(java.lang.String factory)
factory - the factory name
private java.lang.String getServiceReferenceList(java.util.List<org.osgi.framework.ServiceReference> refs)
refs - the references.
private java.lang.String getProvidedServiceDetail(HandlerDescription hd)
hd - the provided service handler description or null if not found.
private java.lang.String getRequiredServiceDetail(HandlerDescription hd)
hd - the required service handler description or null if not found.
private InstanceDescription getInstanceDescriptionByName(java.lang.String name)
name - the instance name
null if not foundprivate void printFactoryList(java.io.PrintWriter pw)
pw - the writer.private void printHandlerList(java.io.PrintWriter pw)
pw - the writer.private static java.lang.String getInstanceState(int state)
state - the state.
private static java.lang.String getFactoryState(int state)
state - the state.
private static java.lang.String getDependencyState(int state)
state - the state.
private static java.lang.String getDependencyBindingPolicy(int policy)
policy - the policy.
private static java.lang.String getProvidedServiceState(int state)
state - the state.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||