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/09/09 19:45:48 UTC
cvs commit: jakarta-avalon-apps/infomover/src/java/org/apache/infomover/jobmanager/impl JobImpl.java
bloritsch 2002/09/09 10:45:48
Modified: infomover/src/java/org/apache/infomover/jobmanager Job.java
Added: infomover/src/java/org/apache/infomover/jobmanager/impl
JobImpl.java
Log:
Add the beginnings of JobImpl and update the interface
Revision Changes Path
1.4 +12 -6 jakarta-avalon-apps/infomover/src/java/org/apache/infomover/jobmanager/Job.java
Index: Job.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-apps/infomover/src/java/org/apache/infomover/jobmanager/Job.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Job.java 19 Aug 2002 16:49:47 -0000 1.3
+++ Job.java 9 Sep 2002 17:45:48 -0000 1.4
@@ -50,7 +50,7 @@
package org.apache.infomover.jobmanager;
import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.activity.Executable;
+import org.apache.avalon.framework.activity.*;
/**
* The <code>Job</code> interface represents a job that can be
@@ -59,7 +59,7 @@
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @version 1.0
*/
-public interface Job extends Executable, Configurable
+public interface Job extends Configurable, Suspendable, Startable
{
/**
* Returns the time when the job was last executed. It helps in checking
@@ -73,13 +73,19 @@
void cancel();
/**
- * Get the number of transactions processed in the last run
+ * Get the number of transactions processed in the last run. For jobs
+ * that are continually running (i.e. listening for input information
+ * from a network connection), it returns the cumulative number of
+ * transactions processed for this Job.
*/
- int lastTransactionCount();
+ int transactionCount();
/**
- * Get the number of transactions successfully processed in the last run
+ * Get the number of transactions successfully processed in the last run.
+ * For jobs that are continually running (i.e. listening for input
+ * information from a network connection), it returns the cumulative
+ * number of successful transactions for this job.
*/
- int lastSuccessfulTransactionCount();
+ int successfulTransactionCount();
}
1.1 jakarta-avalon-apps/infomover/src/java/org/apache/infomover/jobmanager/impl/JobImpl.java
Index: JobImpl.java
===================================================================
/*
============================================================================
The Apache Software License, Version 1.1
============================================================================
Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment: "This product includes software
developed by the Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowledgment may appear in the software itself, if
and wherever such third-party acknowledgments normally appear.
4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
must not be used to endorse or promote products derived from this software
without prior written permission. For written permission, please contact
apache@apache.org.
5. Products derived from this software may not be called "Apache", nor may
"Apache" appear in their name, without prior written permission of the
Apache Software Foundation.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This software consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation. For more information on the
Apache Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.infomover.jobmanager.impl;
import org.apache.infomover.jobmanager.Job;
import org.apache.infomover.jobmanager.JobException;
import org.apache.avalon.framework.configuration.*;
import org.apache.avalon.framework.activity.*;
/**
* The <code>Job</code> interface represents a job that can be
* executed.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @version 1.0
*/
public class JobImpl implements Job, Configurable, Suspendable, Startable
{
/**
* Returns the time when the job was last executed. It helps in checking
* if the job is current.
*/
public long getLastRun()
{
throw new UnsupportedOperationException();
}
/**
* Cancel or stop a running job
*/
public void cancel()
{
throw new UnsupportedOperationException();
}
/**
* Get the number of transactions processed in the last run. For jobs
* that are continually running (i.e. listening for input information
* from a network connection), it returns the cumulative number of
* transactions processed for this Job.
*/
public int transactionCount()
{
throw new UnsupportedOperationException();
}
/**
* Get the number of transactions successfully processed in the last run.
* For jobs that are continually running (i.e. listening for input
* information from a network connection), it returns the cumulative
* number of successful transactions for this job.
*/
public int successfulTransactionCount()
{
throw new UnsupportedOperationException();
}
public void configure( Configuration config )
throws ConfigurationException
{
throw new UnsupportedOperationException();
}
public void suspend()
{
throw new UnsupportedOperationException();
}
public void resume()
{
throw new UnsupportedOperationException();
}
public void start()
{
throw new UnsupportedOperationException();
}
public void stop()
{
throw new UnsupportedOperationException();
}
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>