You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by bl...@apache.org on 2002/08/21 22:28:11 UTC
cvs commit: jakarta-avalon-apps/infomover/src/java/org/apache/infomover/jobmanager/impl JobManagerImpl.java
bloritsch 2002/08/21 13:28:11
Modified: infomover build.xml
infomover/src/java/org/apache/infomover/jobmanager
JobManager.java
infomover/src/java/org/apache/infomover/jobmanager/impl
JobManagerImpl.java
Log:
add initial additions for management, etc
Revision Changes Path
1.2 +4 -2 jakarta-avalon-apps/infomover/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-apps/infomover/build.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- build.xml 13 Aug 2002 15:41:57 -0000 1.1
+++ build.xml 21 Aug 2002 20:28:11 -0000 1.2
@@ -140,6 +140,7 @@
<include name="**/*.java" />
</fileset>
<blockinfo/>
+ <mxinfo/>
<manifest manifestFile="manifest.mf" />
</phoenix-blocks>
@@ -163,13 +164,14 @@
<jar jarfile="${build.lib}/${name}.jar"
manifest="${build.xdoclet}/manifest.mf">
<fileset dir="${build.classes}">
- <include name="org/apache/avalon/overlord/**"/>
+ <include name="org/apache/infomover/**"/>
</fileset>
<fileset dir="${java.dir}">
- <include name="org/apache/avalon/overlord/**/*.properties"/>
+ <include name="org/apache/infomover/**/*.properties"/>
</fileset>
<fileset dir="${build.xdoclet}">
<include name="**/*.xinfo"/>
+ <include name="**/*.mxinfo"/>
</fileset>
</jar>
1.4 +0 -3 jakarta-avalon-apps/infomover/src/java/org/apache/infomover/jobmanager/JobManager.java
Index: JobManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-apps/infomover/src/java/org/apache/infomover/jobmanager/JobManager.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- JobManager.java 19 Aug 2002 16:49:47 -0000 1.3
+++ JobManager.java 21 Aug 2002 20:28:11 -0000 1.4
@@ -55,9 +55,6 @@
* The <code>JobManager</code> interface exposes how we control the JobManager
* externally. We can use other Avalon applications, or the JMX interface.
*
- * @phoenix:service name="org.apache.infomover.jobmanager.JobManager"
- * @phoenix:mx name="org.apache.avalon.infomover.jobmanager.JobManagerMBean"
- *
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @version 1.0
*/
1.4 +37 -3 jakarta-avalon-apps/infomover/src/java/org/apache/infomover/jobmanager/impl/JobManagerImpl.java
Index: JobManagerImpl.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-apps/infomover/src/java/org/apache/infomover/jobmanager/impl/JobManagerImpl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- JobManagerImpl.java 19 Aug 2002 16:49:48 -0000 1.3
+++ JobManagerImpl.java 21 Aug 2002 20:28:11 -0000 1.4
@@ -52,38 +52,57 @@
import org.apache.infomover.jobmanager.*;
import org.apache.avalon.framework.configuration.*;
import org.apache.avalon.framework.service.*;
+import org.apache.avalon.framework.logger.*;
+import org.apache.avalon.cornerstone.services.sockets.SocketManager;
+import org.apache.avalon.cornerstone.services.connection.ConnectionManager;
+import org.apache.avalon.cornerstone.services.scheduler.TimeScheduler;
/**
* The <code>JobManager</code> interface exposes how we control the JobManager
* externally. We can use other Avalon applications, or the JMX interface.
*
* @phoenix:block
+ * @phoenix:mx-topic name="InfoMover"
+ * @phoenix:service name="org.apache.infomover.jobmanager.JobManager"
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @version 1.0
*/
public class JobManagerImpl
+extends AbstractLogEnabled
implements JobManager, JobManagerMBean, Serviceable
{
+ private TimeScheduler m_scheduler = null;
+ private ConnectionManager m_connections = null;
+ private SocketManager m_sockets = null;
+
/**
*
* @phoenix:dependency name="org.apache.avalon.cornerstone.services.sockets.SocketManager"
* @phoenix:dependency name="org.apache.avalon.cornerstone.services.connection.ConnectionManager"
+ * @phoenix:dependency name="org.apache.avalon.cornerstone.services.scheduler.TimeScheduler"
*
*/
public void service( final ServiceManager serviceManager )
throws ServiceException
{
-// getLogger().info( "HelloWorldServer.compose()" );
+ getLogger().debug( "Getting required services..." );
-// m_socketManager = (SocketManager)serviceManager.lookup( SocketManager.ROLE );
-// m_connectionManager = (ConnectionManager)serviceManager.lookup( ConnectionManager.ROLE );
+ m_scheduler = (TimeScheduler)serviceManager.lookup( TimeScheduler.ROLE );
+ getLogger().debug( "... got TimeScheduler ..." );
+ m_sockets = (SocketManager)serviceManager.lookup( SocketManager.ROLE );
+ getLogger().debug( "... got SocketManager ..." );
+ m_connections = (ConnectionManager)serviceManager.lookup( ConnectionManager.ROLE );
+ getLogger().debug( "... got ConnectionManager ... done." );
}
/**
* Adds a new job to the JobManager's Queue. We pass in a configuration
* file, and the JobManager will pass back the job name.
*
+ * @phoenix:mx-operation
+ * @phoenix:mx-description Add a job to InfoMover
+ *
* @param configuration The job's configuration information
*
* @return the name of the job
@@ -98,6 +117,9 @@
/**
* Removes an existing job from the JobManager's Queue. If the job does not
* exist, the JobManager will ignore it.
+
+ * @phoenix:mx-operation
+ * @phoenix:mx-description Remove a job from InfoMover
*
* @param name The name of the job we want to remove.
*/
@@ -109,6 +131,9 @@
/**
* Cancel a running job. It will return immediately if the Job does not exist.
*
+ * @phoenix:mx-operation
+ * @phoenix:mx-description Cancel a running job in InfoMover
+ *
* @param name The name of the job we want to remove.
*
* @throws JobException if there is no job by the name or there is a problem
@@ -123,6 +148,9 @@
* Execute an existing job in the JobManager's Queue. If the job does not
* exist, the JobManager will throw an exception.
*
+ * @phoenix:mx-operation
+ * @phoenix:mx-description Run a job in InfoMover
+ *
* @param name The name of the job we want to remove.
*
* @throws JobException if there is no job by the name or there is a problem
@@ -138,6 +166,9 @@
* configuration file is run only once, unless the configuration does not
* represent a valid job.
*
+ * @phoenix:mx-operation
+ * @phoenix:mx-description Execute a job, but don't add it to the job queue.
+ *
* @param configuration The configuration that defines the job.
*
* @throws JobException when the configuration does not represent a valid job.
@@ -150,6 +181,9 @@
/**
* Lists all the jobs that are in the Job queue. We return the Job reference
* itself so that we can directly execute it, or we can get its name.
+ *
+ * @phoenix:mx-attribute
+ * @phoenix:mx-description Get a list of available jobs in the queue.
*
* @return an array of Jobs.
*/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>