mcconnell 2003/06/18 04:11:50
Modified: merlin/assembly-spi/src/java/org/apache/avalon/assembly/appliance
Appliance.java ApplianceFactory.java
merlin/assembly-spi/src/java/org/apache/avalon/assembly/lifestyle
LifestyleHandler.java
merlin/assembly-spi/src/java/org/apache/avalon/assembly/locator
Reclaimable.java
Log:
1. simplified appliance creation arguments in factory interface
2. removed setEnabled from Appliance interface
3. moved deploy and decommission from Block to Appliance
4 added explicit decommissioning phase for lifecycle handlers
Revision Changes Path
1.11 +15 -7
avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/appliance/Appliance.java
Index: Appliance.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/appliance/Appliance.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Appliance.java 15 Jun 2003 18:23:21 -0000 1.10
+++ Appliance.java 18 Jun 2003 11:11:50 -0000 1.11
@@ -194,12 +194,6 @@
boolean isEnabled();
/**
- * Set the enabled status of the appliance to the supplied value.
- * @param value the enabled status - TRUE or FALSE
- */
- void setEnabled( boolean value );
-
- /**
* Return the logging categories for the appliance.
*
* @return the logger
@@ -286,6 +280,20 @@
* Disassemble the appliance.
*/
void disassemble();
+
+ /**
+ * Deploy the appliance. If the deployment policy is startup
+ * an initial instance of a component will be deployed.
+ *
+ * @exception Exception if a deployment error occurs
+ */
+ void deploy() throws Exception;
+
+ /**
+ * Decommission the block. Under the decommissioning phase,
+ * all active components will be taken down.
+ */
+ void decommission();
/**
* Terminate the appliance.
1.3 +3 -4
avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/appliance/ApplianceFactory.java
Index: ApplianceFactory.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/appliance/ApplianceFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ApplianceFactory.java 11 Apr 2003 20:28:31 -0000 1.2
+++ ApplianceFactory.java 18 Jun 2003 11:11:50 -0000 1.3
@@ -79,11 +79,10 @@
* @param system the system context
* @param engine the engine classloader
* @param context the appliance creation context
- * @param logger the logging channel to assign to the appliance
* @return the appliance
* @exception ApplianceException if an appliance creation failure occurs
*/
Appliance createAppliance(
- Locator system, Engine engine, ApplianceContext context, Logger logger )
- throws ApplianceException;
+ Locator system, Engine engine, ApplianceContext context )
+ throws ApplianceException;
}
1.2 +7 -1
avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/lifestyle/LifestyleHandler.java
Index: LifestyleHandler.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/lifestyle/LifestyleHandler.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- LifestyleHandler.java 20 Apr 2003 12:13:03 -0000 1.1
+++ LifestyleHandler.java 18 Jun 2003 11:11:50 -0000 1.2
@@ -61,6 +61,12 @@
public interface LifestyleHandler extends Reclaimable
{
/**
+ * Decommission all active objects maintained by the handler.
+ * @exception Exception if an error occurs while decommissioning
+ */
+ void decommission() throws Exception;
+
+ /**
* Terminate the handler.
*/
void terminate();
1.2 +2 -2
avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/locator/Reclaimable.java
Index: Reclaimable.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/merlin/assembly-spi/src/java/org/apache/avalon/assembly/locator/Reclaimable.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Reclaimable.java 13 Mar 2003 01:04:48 -0000 1.1
+++ Reclaimable.java 18 Jun 2003 11:11:50 -0000 1.2
@@ -67,7 +67,7 @@
* Release an object
*
* @param the object to be reclaimed
- * @param partition the context with respect the reclaimed object is qualified
+ * @param source the context with respect the reclaimed object is qualified
*/
- void release( Object object, Object partition );
+ void release( Object object, Object source );
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]