donaldp 01/02/25 22:05:58
Modified: proposal/4.0/src/java/org/apache/avalon/datasource
JdbcConnectionPool.java JdbcDataSource.java
proposal/4.0/src/java/org/apache/avalon/pool
AbstractPool.java
Added: proposal/4.0/src/java/org/apache/avalon/lifecycle
Disposable.java Initializable.java Resumable.java
Startable.java Stoppable.java Suspendable.java
Removed: proposal/4.0/src/java/org/apache/avalon Disposable.java
Initializable.java Resumable.java Startable.java
Stoppable.java Suspendable.java
Log:
Moved around lifecycle methods.
Revision Changes Path
1.3 +3 -3
jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/datasource/JdbcConnectionPool.java
Index: JdbcConnectionPool.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/datasource/JdbcConnectionPool.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- JdbcConnectionPool.java 2001/02/26 00:42:46 1.2
+++ JdbcConnectionPool.java 2001/02/26 06:05:55 1.3
@@ -13,9 +13,9 @@
import java.util.ArrayList;
import java.util.List;
import org.apache.avalon.AbstractLoggable;
-import org.apache.avalon.Disposable;
-import org.apache.avalon.Initializable;
import org.apache.avalon.Recyclable;
+import org.apache.avalon.lifecycle.Disposable;
+import org.apache.avalon.lifecycle.Initializable;
import org.apache.avalon.pool.Pool;
import org.apache.avalon.pool.Poolable;
@@ -24,7 +24,7 @@
* thread to manage the number of SQL Connections.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Berin Loritsch</a>
- * @version CVS $Revision: 1.2 $ $Date: 2001/02/26 00:42:46 $
+ * @version CVS $Revision: 1.3 $ $Date: 2001/02/26 06:05:55 $
*/
public class JdbcConnectionPool
extends AbstractLoggable
1.2 +3 -3
jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/datasource/JdbcDataSource.java
Index: JdbcDataSource.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/datasource/JdbcDataSource.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JdbcDataSource.java 2001/02/25 10:45:46 1.1
+++ JdbcDataSource.java 2001/02/26 06:05:56 1.2
@@ -9,10 +9,10 @@
import java.sql.Connection;
import java.sql.SQLException;
+import org.apache.avalon.AbstractLoggable;
import org.apache.avalon.configuration.Configuration;
import org.apache.avalon.configuration.ConfigurationException;
-import org.apache.avalon.Disposable;
-import org.apache.avalon.AbstractLoggable;
+import org.apache.avalon.lifecycle.Disposable;
/**
* The Default implementation for DataSources in Avalon. This uses the
@@ -20,7 +20,7 @@
* <code>java.sql.DriverManager</code>.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Berin Loritsch</a>
- * @version CVS $Revision: 1.1 $ $Date: 2001/02/25 10:45:46 $
+ * @version CVS $Revision: 1.2 $ $Date: 2001/02/26 06:05:56 $
*/
public class JdbcDataSource
extends AbstractLoggable
1.1
jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/lifecycle/Disposable.java
Index: Disposable.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.avalon.lifecycle;
/**
* This interface should be implemented by those classes that
* need to provide a service that requires some resources to be
* initialized before being able to operate and properly destroyed
* before termination and unloading.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Federico Barbieri</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
*/
public interface Disposable
{
/**
* Destroys the service. This method is guaranteed to be called always
* after the stop() method if this class implements
<code>Stoppable</code>.
*/
void dispose()
throws Exception;
}
1.1
jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/lifecycle/Initializable.java
Index: Initializable.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.avalon.lifecycle;
/**
* This interface should be implemented by those classes that
* need to provide a service that requires some resources to be
* initialized before being able to operate.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Federico Barbieri</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
*/
public interface Initializable
{
/**
* Initialize the service. This method is guaranteed to be called always
* after methods in <code>Configurable</code> and <code>Component</code>,
* if the class implements those interfaces and before the run() method
* if the class implements <code>Runnable</code>.
*/
void init()
throws Exception;
}
1.1
jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/lifecycle/Resumable.java
Index: Resumable.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.avalon.lifecycle;
/**
* This is used to restart execturion after temporarily halt.
* The halt may have been for some re- configuring|composing|contextualizing
*
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
*/
public interface Resumable
{
/**
* Resumes the component.
*/
void resume();
}
1.1
jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/lifecycle/Startable.java
Index: Startable.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.avalon.lifecycle;
/**
* This interface is the dual interface of Stoppable.
*
* It provides a method through which components can be "started"
* without requiring a thread. Useful for reactive or passive objects.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
*/
public interface Startable
{
/**
* Starts the component.
*/
void start()
throws Exception;
}
1.1
jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/lifecycle/Stoppable.java
Index: Stoppable.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.avalon.lifecycle;
/**
* This interface is the dual interface of the <code>java.lang.Runnable</code>
* interface and provides a hook to safely stop the thread of execution.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Federico Barbieri</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
*/
public interface Stoppable
{
/**
* Stops the current thread of execution.
*/
void stop()
throws Exception;
}
1.1
jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/lifecycle/Suspendable.java
Index: Suspendable.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.avalon.lifecycle;
/**
* This is used to temporarily halt execution of a component.
* The execution may be halted so that you can reconfigure/
* recompose/recontextualize component
*
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
*/
public interface Suspendable
{
/**
* Suspends the component.
*/
void suspend();
}
1.2 +1 -1
jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/pool/AbstractPool.java
Index: AbstractPool.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon/proposal/4.0/src/java/org/apache/avalon/pool/AbstractPool.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractPool.java 2001/02/26 00:38:19 1.1
+++ AbstractPool.java 2001/02/26 06:05:57 1.2
@@ -7,7 +7,7 @@
*/
package org.apache.avalon.pool;
-import org.apache.avalon.Initializable;
+import org.apache.avalon.lifecycle.Initializable;
import org.apache.avalon.Recyclable;
/**