dlr 01/08/09 12:07:26
Modified: src/core/java/org/apache/fulcrum Service.java
Log:
Added example implementation of init().
Revision Changes Path
1.2 +18 -2
jakarta-turbine-fulcrum/src/core/java/org/apache/fulcrum/Service.java
Index: Service.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-fulcrum/src/core/java/org/apache/fulcrum/Service.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -u -r1.1 -r1.2
--- Service.java 2001/07/31 14:35:41 1.1
+++ Service.java 2001/08/09 19:07:25 1.2
@@ -67,7 +67,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Rafal Krzewski</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Daniel Rall</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
- * @version $Id: Service.java,v 1.1 2001/07/31 14:35:41 jvanzyl Exp $
+ * @version $Id: Service.java,v 1.2 2001/08/09 19:07:25 dlr Exp $
*/
public interface Service
{
@@ -81,7 +81,23 @@
*
* When your class is being requested from an InitableBroker, it
* will call getInit(), and if it returns false, this method will
- * be invoked.
+ * be invoked. A typical implementation will look something like
+ * the following:
+ *
+ * <blockquote><code><pre>
+ * try
+ * {
+ * // Your initialization activities ...
+ * setInit(true);
+ * }
+ * catch (Exception e)
+ * {
+ * throw new InitializationException("Something bad happened during " +
+ * Service.SERVICE_NAME +
+ * " initialization: " +
+ * e.getMessage());
+ * }
+ * </pre></code></blockquote>
*
* @exception InitializationException, if initialization of this
* class was not successful.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]