felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1438552 - in /felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status: PrinterMode.java StatusPrinter.java StatusPrinterHandler.java impl/AbstractWebConsolePlugin.java impl/ClassUtils.java impl/WebConsolePlugin.java
Date Fri, 25 Jan 2013 15:23:17 GMT
Author: cziegeler
Date: Fri Jan 25 15:23:17 2013
New Revision: 1438552

URL: http://svn.apache.org/viewvc?rev=1438552&view=rev
Log:
Add more javadocs

Modified:
    felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/PrinterMode.java
    felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/StatusPrinter.java
    felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/StatusPrinterHandler.java
    felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/impl/AbstractWebConsolePlugin.java
    felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/impl/ClassUtils.java
    felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/impl/WebConsolePlugin.java

Modified: felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/PrinterMode.java
URL: http://svn.apache.org/viewvc/felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/PrinterMode.java?rev=1438552&r1=1438551&r2=1438552&view=diff
==============================================================================
--- felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/PrinterMode.java
(original)
+++ felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/PrinterMode.java
Fri Jan 25 15:23:17 2013
@@ -18,6 +18,9 @@
  */
 package org.apache.felix.status;
 
+/**
+ * Enumeration for the different printer modes.
+ */
 public enum PrinterMode {
 
     TEXT,       // plain text

Modified: felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/StatusPrinter.java
URL: http://svn.apache.org/viewvc/felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/StatusPrinter.java?rev=1438552&r1=1438551&r2=1438552&view=diff
==============================================================================
--- felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/StatusPrinter.java
(original)
+++ felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/StatusPrinter.java
Fri Jan 25 15:23:17 2013
@@ -45,8 +45,8 @@ public interface StatusPrinter {
      * The value of this property is either a string or a string array containing
      * valid names of {@link PrinterMode}.
      *
-     * If this property is missing the printer is ignored.
-     *
+     * If this property is missing or contains invalid values,
+     * the printer is ignored.
      */
     String CONFIG_PRINTER_MODES = "felix.statusprinter.modes"; //$NON-NLS-1$
 
@@ -75,6 +75,9 @@ public interface StatusPrinter {
      * Prints the configuration report to the given <code>printWriter</code>.
      * Implementations are free to print whatever information they deem useful.
      *
+     * If a printer is invoked with a mode it doesn't support ({@link #CONFIG_PRINTER_MODES})
+     * the printer should just do/print nothing and directly return.
+     *
      * @param mode The render mode.
      * @param printWriter where to write the configuration data. It might be flushed,
      * but must not be closed.

Modified: felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/StatusPrinterHandler.java
URL: http://svn.apache.org/viewvc/felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/StatusPrinterHandler.java?rev=1438552&r1=1438551&r2=1438552&view=diff
==============================================================================
--- felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/StatusPrinterHandler.java
(original)
+++ felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/StatusPrinterHandler.java
Fri Jan 25 15:23:17 2013
@@ -21,7 +21,11 @@ package org.apache.felix.status;
 
 /**
  * The status printer handler can be used by clients to access
- * a status printer.
+ * a status printer. The handlers can be get from the {@link StatusPrinterManager}.
+ *
+ * For clients using status printers, a handler simplifies accessing and
+ * working with the status printer. A client should never lookup a
+ * status printer directly.
  */
 public interface StatusPrinterHandler extends StatusPrinter, ZipAttachmentProvider {
 

Modified: felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/impl/AbstractWebConsolePlugin.java
URL: http://svn.apache.org/viewvc/felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/impl/AbstractWebConsolePlugin.java?rev=1438552&r1=1438551&r2=1438552&view=diff
==============================================================================
--- felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/impl/AbstractWebConsolePlugin.java
(original)
+++ felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/impl/AbstractWebConsolePlugin.java
Fri Jan 25 15:23:17 2013
@@ -224,6 +224,9 @@ public abstract class AbstractWebConsole
         }
     }
 
+    /**
+     * Base class for all configuration writers.
+     */
     private abstract static class ConfigurationWriter extends PrintWriter {
 
         ConfigurationWriter( final Writer delegatee ) {
@@ -249,6 +252,9 @@ public abstract class AbstractWebConsole
         }
     }
 
+    /**
+     * The HTML configuration writer outputs the status as an HTML snippet.
+     */
     private static class HtmlConfigurationWriter extends ConfigurationWriter {
 
         // whether or not to filter "<" signs in the output
@@ -356,6 +362,9 @@ public abstract class AbstractWebConsole
         }
     }
 
+    /**
+     * The plain text configuration writer outputs the status as plain text.
+     */
     private static class PlainTextConfigurationWriter extends ConfigurationWriter {
 
         PlainTextConfigurationWriter( final Writer delegatee ) {
@@ -376,6 +385,12 @@ public abstract class AbstractWebConsole
         }
     }
 
+    /**
+     * The ZIP configuration writer creates a zip with
+     * - txt output of a status printers (if supported)
+     * - json output of a status printers (if supported)
+     * - attachments from a status printer (if supported)
+     */
     private static class ZipConfigurationWriter extends ConfigurationWriter {
 
         private final ZipOutputStream zip;

Modified: felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/impl/ClassUtils.java
URL: http://svn.apache.org/viewvc/felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/impl/ClassUtils.java?rev=1438552&r1=1438551&r2=1438552&view=diff
==============================================================================
--- felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/impl/ClassUtils.java
(original)
+++ felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/impl/ClassUtils.java
Fri Jan 25 15:23:17 2013
@@ -19,12 +19,13 @@ package org.apache.felix.status.impl;
 import java.lang.reflect.Method;
 
 /**
- * Utility methods
+ * Utility methods for dynamic method invocations
  */
 public class ClassUtils {
 
     /**
-     * Search a method with the given name and signature
+     * Search a method with the given name and signature.
+     * @return The method or <code>null</code> if not found.
      */
     public static Method searchMethod(final Class<?> clazz, final String mName, final
Class<?>[] params) {
         try {
@@ -43,7 +44,8 @@ public class ClassUtils {
     }
 
     /**
-     * Invoke the method on the printer with the arguments.
+     * Invoke the method on the object with the arguments.
+     * @return The result of the method invocation or <code>null</code> if an
exception occurs.
      */
     public static Object invoke(final Object obj, final Method m, final Object[] args) {
         try {

Modified: felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/impl/WebConsolePlugin.java
URL: http://svn.apache.org/viewvc/felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/impl/WebConsolePlugin.java?rev=1438552&r1=1438551&r2=1438552&view=diff
==============================================================================
--- felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/impl/WebConsolePlugin.java
(original)
+++ felix/sandbox/cziegeler/status-printer/src/main/java/org/apache/felix/status/impl/WebConsolePlugin.java
Fri Jan 25 15:23:17 2013
@@ -39,7 +39,8 @@ public class WebConsolePlugin extends Ab
 
     /**
      * Constructor
-     * @param statusPrinterAdapter The adapter
+     * @param statusPrinterManager The status printer manager.
+     * @param printerName The name of the printer this plugin is displaying.
      */
     WebConsolePlugin(final StatusPrinterManager statusPrinterManager,
             final String printerName) {



Mime
View raw message