You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by dl...@apache.org on 2001/08/09 21:07:26 UTC
cvs commit: jakarta-turbine-fulcrum/src/core/java/org/apache/fulcrum Service.java
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:krzewski@e-point.pl">Rafal Krzewski</a>
* @author <a href="mailto:dlr@collab.net">Daniel Rall</a>
* @author <a href="mailto:jvanzyl@apache.org">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: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org