Skip to Content.
Sympa Menu

notify-dpml - r1246 - in trunk/main: station/server/src/main/net/dpml/station/server util/job/api util/job/api/src/main/net/dpml/job util/job/impl util/job/impl/src/main/net/dpml/job/impl util/job/impl/src/test/net/dpml/job/test

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1246 - in trunk/main: station/server/src/main/net/dpml/station/server util/job/api util/job/api/src/main/net/dpml/job util/job/impl util/job/impl/src/main/net/dpml/job/impl util/job/impl/src/test/net/dpml/job/test
  • Date: Wed, 22 Mar 2006 18:18:49 +0100

Author: mcconnell
Date: 2006-03-22 18:18:47 +0100 (Wed, 22 Mar 2006)
New Revision: 1246

Modified:

trunk/main/station/server/src/main/net/dpml/station/server/ErrorStreamReader.java

trunk/main/station/server/src/main/net/dpml/station/server/OutputStreamReader.java

trunk/main/station/server/src/main/net/dpml/station/server/RemoteApplication.java

trunk/main/station/server/src/main/net/dpml/station/server/StreamReader.java
trunk/main/util/job/api/
trunk/main/util/job/api/src/main/net/dpml/job/Commissionable.java
trunk/main/util/job/api/src/main/net/dpml/job/CommissionerController.java
trunk/main/util/job/api/src/main/net/dpml/job/CommissionerEvent.java
trunk/main/util/job/api/src/main/net/dpml/job/TimeoutError.java
trunk/main/util/job/api/src/main/net/dpml/job/TimeoutException.java
trunk/main/util/job/impl/

trunk/main/util/job/impl/src/main/net/dpml/job/impl/DefaultCommissioner.java
trunk/main/util/job/impl/src/main/net/dpml/job/impl/FIFO.java

trunk/main/util/job/impl/src/test/net/dpml/job/test/DefaultCommissionerTestCase.java
Log:
checkstyle cleanup

Modified:
trunk/main/station/server/src/main/net/dpml/station/server/ErrorStreamReader.java
===================================================================
---
trunk/main/station/server/src/main/net/dpml/station/server/ErrorStreamReader.java
2006-03-22 16:51:33 UTC (rev 1245)
+++
trunk/main/station/server/src/main/net/dpml/station/server/ErrorStreamReader.java
2006-03-22 17:18:47 UTC (rev 1246)
@@ -22,29 +22,8 @@
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
-import java.rmi.ConnectException;
-import java.rmi.RemoteException;
-import java.util.Enumeration;
-import java.util.ArrayList;
-import java.util.Properties;
-import java.util.EventObject;
-import java.util.EventListener;

-import net.dpml.station.info.StartupPolicy;
-import net.dpml.station.info.ApplicationDescriptor;
-
-import net.dpml.component.Component;
-import net.dpml.component.Provider;
-
-import net.dpml.station.Callback;
-import net.dpml.station.ProcessState;
-import net.dpml.station.Application;
-import net.dpml.station.ApplicationException;
-import net.dpml.station.ApplicationListener;
-import net.dpml.station.ApplicationEvent;
-
import net.dpml.lang.Logger;
-import net.dpml.lang.PID;

/**
* Stream reader utility class.
@@ -56,6 +35,7 @@
{
/**
* Creation of a process output reader.
+ * @param logger the assigned logging channel
* @param input the subprocess input stream
*/
public ErrorStreamReader( Logger logger, InputStream input )

Modified:
trunk/main/station/server/src/main/net/dpml/station/server/OutputStreamReader.java
===================================================================
---
trunk/main/station/server/src/main/net/dpml/station/server/OutputStreamReader.java
2006-03-22 16:51:33 UTC (rev 1245)
+++
trunk/main/station/server/src/main/net/dpml/station/server/OutputStreamReader.java
2006-03-22 17:18:47 UTC (rev 1246)
@@ -22,29 +22,8 @@
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
-import java.rmi.ConnectException;
-import java.rmi.RemoteException;
-import java.util.Enumeration;
-import java.util.ArrayList;
-import java.util.Properties;
-import java.util.EventObject;
-import java.util.EventListener;

-import net.dpml.station.info.StartupPolicy;
-import net.dpml.station.info.ApplicationDescriptor;
-
-import net.dpml.component.Component;
-import net.dpml.component.Provider;
-
-import net.dpml.station.Callback;
-import net.dpml.station.ProcessState;
-import net.dpml.station.Application;
-import net.dpml.station.ApplicationException;
-import net.dpml.station.ApplicationListener;
-import net.dpml.station.ApplicationEvent;
-
import net.dpml.lang.Logger;
-import net.dpml.lang.PID;

/**
* Stream reader utility class.
@@ -56,6 +35,7 @@
{
/**
* Creation of a process output reader.
+ * @param logger the assigned logging channel
* @param input the subprocess input stream
*/
public OutputStreamReader( Logger logger, InputStream input )

Modified:
trunk/main/station/server/src/main/net/dpml/station/server/RemoteApplication.java
===================================================================
---
trunk/main/station/server/src/main/net/dpml/station/server/RemoteApplication.java
2006-03-22 16:51:33 UTC (rev 1245)
+++
trunk/main/station/server/src/main/net/dpml/station/server/RemoteApplication.java
2006-03-22 17:18:47 UTC (rev 1246)
@@ -19,9 +19,6 @@
package net.dpml.station.server;

import java.io.IOException;
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
import java.rmi.ConnectException;
import java.rmi.RemoteException;
import java.util.Enumeration;

Modified:
trunk/main/station/server/src/main/net/dpml/station/server/StreamReader.java
===================================================================
---
trunk/main/station/server/src/main/net/dpml/station/server/StreamReader.java
2006-03-22 16:51:33 UTC (rev 1245)
+++
trunk/main/station/server/src/main/net/dpml/station/server/StreamReader.java
2006-03-22 17:18:47 UTC (rev 1246)
@@ -18,33 +18,9 @@

package net.dpml.station.server;

-import java.io.IOException;
-import java.io.BufferedReader;
import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.rmi.ConnectException;
-import java.rmi.RemoteException;
-import java.util.Enumeration;
-import java.util.ArrayList;
-import java.util.Properties;
-import java.util.EventObject;
-import java.util.EventListener;

-import net.dpml.station.info.StartupPolicy;
-import net.dpml.station.info.ApplicationDescriptor;
-
-import net.dpml.component.Component;
-import net.dpml.component.Provider;
-
-import net.dpml.station.Callback;
-import net.dpml.station.ProcessState;
-import net.dpml.station.Application;
-import net.dpml.station.ApplicationException;
-import net.dpml.station.ApplicationListener;
-import net.dpml.station.ApplicationEvent;
-
import net.dpml.lang.Logger;
-import net.dpml.lang.PID;

/**
* Stream reader utility class.
@@ -59,6 +35,7 @@

/**
* Creation of a new reader.
+ * @param logger the assigned logging channel
* @param input the subprocess input stream
*/
public StreamReader( Logger logger, InputStream input )


Property changes on: trunk/main/util/job/api
___________________________________________________________________
Name: svn:ignore
+ target


Modified: trunk/main/util/job/api/src/main/net/dpml/job/Commissionable.java
===================================================================
--- trunk/main/util/job/api/src/main/net/dpml/job/Commissionable.java
2006-03-22 16:51:33 UTC (rev 1245)
+++ trunk/main/util/job/api/src/main/net/dpml/job/Commissionable.java
2006-03-22 17:18:47 UTC (rev 1246)
@@ -28,10 +28,13 @@
public interface Commissionable
{
/**
+ * Commission the instance.
+ * @exception Exception if an error occurs
*/
void commission() throws Exception;

/**
+ * Decommission the instance.
*/
void decommission();
}

Modified:
trunk/main/util/job/api/src/main/net/dpml/job/CommissionerController.java
===================================================================
--- trunk/main/util/job/api/src/main/net/dpml/job/CommissionerController.java
2006-03-22 16:51:33 UTC (rev 1245)
+++ trunk/main/util/job/api/src/main/net/dpml/job/CommissionerController.java
2006-03-22 17:18:47 UTC (rev 1246)
@@ -56,15 +56,16 @@
* object failed to resopond to an interrup and was subsequently
* terminated.
* @param event the commissioner event
+ * @param cause the causal exception
* @exception InvocationTargetException optional wrapped client exception
*/
- void failed( CommissionerEvent event, Throwable e ) throws
InvocationTargetException;
+ void failed( CommissionerEvent event, Throwable cause ) throws
InvocationTargetException;

/**
* Notification that a commissioning or decommissioning
* process has failed.
* @param event the commissioner event
- * @exception TimeoutException optional controller initiated timeout
exception
+ * @exception TimeoutError optional controller initiated timeout error
*/
void terminated( CommissionerEvent event ) throws TimeoutError;
}

Modified: trunk/main/util/job/api/src/main/net/dpml/job/CommissionerEvent.java
===================================================================
--- trunk/main/util/job/api/src/main/net/dpml/job/CommissionerEvent.java
2006-03-22 16:51:33 UTC (rev 1245)
+++ trunk/main/util/job/api/src/main/net/dpml/job/CommissionerEvent.java
2006-03-22 17:18:47 UTC (rev 1246)
@@ -40,7 +40,6 @@
* Construct a new <code>CommissionerEvent</code>.
*
* @param target the commissionable target
- * @param stage the commissioning stage
* @param flag if true then commissioning else decommissioning
* @param duration the applicable duration relative to the stage
*/
@@ -62,10 +61,11 @@
}

/**
- * Get the application duration. If the event is related to the STARTED,
- * INTERUPTED or FAILED the value returned is the timeout constraint. If
the
- * stage is COMPLETED the value is equal to the actual time taken to
execute
- * the commissioning or decommissioning process.
+ * Get the application duration. If the event is related to the started,
+ * interrupted, terminated, or failed phase the value returned is the
timeout
+ * constraint. If the stage is normal completion the value is equal to
the
+ * actual time taken to execute the commissioning or decommissioning
process.
+ * @return the applicable duration
*/
public long getDuration()
{

Modified: trunk/main/util/job/api/src/main/net/dpml/job/TimeoutError.java
===================================================================
--- trunk/main/util/job/api/src/main/net/dpml/job/TimeoutError.java
2006-03-22 16:51:33 UTC (rev 1245)
+++ trunk/main/util/job/api/src/main/net/dpml/job/TimeoutError.java
2006-03-22 17:18:47 UTC (rev 1246)
@@ -31,7 +31,7 @@
/**
* Construct a new <code>TimeoutError</code> instance.
*
- * @param message The detail message for this exception.
+ * @param timeout the timeout value.
*/
public TimeoutError( long timeout )
{

Modified: trunk/main/util/job/api/src/main/net/dpml/job/TimeoutException.java
===================================================================
--- trunk/main/util/job/api/src/main/net/dpml/job/TimeoutException.java
2006-03-22 16:51:33 UTC (rev 1245)
+++ trunk/main/util/job/api/src/main/net/dpml/job/TimeoutException.java
2006-03-22 17:18:47 UTC (rev 1246)
@@ -31,7 +31,7 @@
/**
* Construct a new <code>TimeoutException</code> instance.
*
- * @param message The detail message for this exception.
+ * @param timeout the timeout value.
*/
public TimeoutException( long timeout )
{


Property changes on: trunk/main/util/job/impl
___________________________________________________________________
Name: svn:ignore
+ target


Modified:
trunk/main/util/job/impl/src/main/net/dpml/job/impl/DefaultCommissioner.java
===================================================================
---
trunk/main/util/job/impl/src/main/net/dpml/job/impl/DefaultCommissioner.java
2006-03-22 16:51:33 UTC (rev 1245)
+++
trunk/main/util/job/impl/src/main/net/dpml/job/impl/DefaultCommissioner.java
2006-03-22 17:18:47 UTC (rev 1246)
@@ -39,12 +39,6 @@
public class DefaultCommissioner implements Commissioner, Runnable
{
//------------------------------------------------------------
- // static
- //------------------------------------------------------------
-
- private static int m_counter = 0;
-
- //------------------------------------------------------------
// immutable state
//------------------------------------------------------------

@@ -64,18 +58,24 @@
// constructor
//------------------------------------------------------------

- public DefaultCommissioner( String name, boolean flag,
CommissionerController listener )
+ /**
+ * Creation of a new commissioner.
+ * @param name the commissioner name
+ * @param flag true if commissioning, flase if decommissioning
+ * @param controller the commissioner controller
+ */
+ public DefaultCommissioner( String name, boolean flag,
CommissionerController controller )
{
if( null == name )
{
throw new NullPointerException( "name" );
}
- if( null == listener )
+ if( null == controller )
{
- throw new NullPointerException( "listener" );
+ throw new NullPointerException( "controller" );
}
m_flag = flag;
- m_listener = listener;
+ m_listener = controller;
m_thread = new Thread( this, name );
m_thread.start();
}
@@ -91,14 +91,11 @@
* @param commissionable the commissionable instance
* @param timeout the maximum number of milliseconds to allow
*
- * @throws TimeoutException if the deployment was not
- * completed within the timeout deadline and interuption
- * of the deployment was successful
- * @throws TimeoutError if the deployment was not
- * completed within the timeout deadline and interuption
- * of the deployment was not successful
- * @throws InvocationTargetException if the deployment target raises an
exception
- **/
+ * @throws TimeoutException raised by attached controller
+ * @throws TimeoutError raised by attached controller
+ * @throws InvocationTargetException raised by attached controller
+ * @see CommissionerController
+ */
public void add( Commissionable commissionable, long timeout )
throws TimeoutException, TimeoutError, InvocationTargetException
{
@@ -166,6 +163,9 @@
}
}

+ /**
+ * Runnable implementation (handled in constructor).
+ */
public void run()
{
try

Modified: trunk/main/util/job/impl/src/main/net/dpml/job/impl/FIFO.java
===================================================================
--- trunk/main/util/job/impl/src/main/net/dpml/job/impl/FIFO.java
2006-03-22 16:51:33 UTC (rev 1245)
+++ trunk/main/util/job/impl/src/main/net/dpml/job/impl/FIFO.java
2006-03-22 17:18:47 UTC (rev 1246)
@@ -58,9 +58,9 @@
{
while( m_queue.size() == 0 )
{
- wait(100);
+ wait( 100 );
}
- return m_queue.remove(0);
+ return m_queue.remove( 0 );
}
}


Modified:
trunk/main/util/job/impl/src/test/net/dpml/job/test/DefaultCommissionerTestCase.java
===================================================================
---
trunk/main/util/job/impl/src/test/net/dpml/job/test/DefaultCommissionerTestCase.java
2006-03-22 16:51:33 UTC (rev 1245)
+++
trunk/main/util/job/impl/src/test/net/dpml/job/test/DefaultCommissionerTestCase.java
2006-03-22 17:18:47 UTC (rev 1246)
@@ -24,7 +24,6 @@

import net.dpml.transit.monitor.LoggingAdapter;

-import net.dpml.job.Commissioner;
import net.dpml.job.Commissionable;
import net.dpml.job.CommissionerController;
import net.dpml.job.CommissionerEvent;
@@ -196,6 +195,9 @@
}
}

+ /**
+ * Test object.
+ */
private class Widget implements Commissionable
{
/**
@@ -237,6 +239,9 @@
}
}

+ /**
+ * Test object.
+ */
private class Gizmo implements Commissionable
{
/**
@@ -275,13 +280,15 @@
}
}

+ /**
+ * Test controller.
+ */
public class DefaultCommissionerController implements
CommissionerController
{
/**
* Notification that a commissioning or decommissioning
* process has commenced.
* @param event the commissioner event
- * @exception RemoteException if a remote exception occurs
*/
public void started( CommissionerEvent event )
{
@@ -297,7 +304,6 @@
* Notification that a commissioning or decommissioning
* process has completed.
* @param event the commissioner event
- * @exception RemoteException if a remote exception occurs
*/
public void completed( CommissionerEvent event )
{
@@ -315,7 +321,7 @@
* Notification that a commissioning or decommissioning
* process has been interrupted.
* @param event the commissioner event
- * @exception Exception client initiated exception
+ * @exception TimeoutException thrown ofter logging event
*/
public void interrupted( CommissionerEvent event ) throws
TimeoutException
{
@@ -334,7 +340,7 @@
* Notification that a commissioning or decommissioning
* process has been terminated.
* @param event the commissioner event
- * @exception Exception client initiated exception
+ * @exception TimeoutError thrown ofter logging event
*/
public void terminated( CommissionerEvent event ) throws TimeoutError
{
@@ -354,7 +360,7 @@
* process failed.
* @param event the commissioner event
* @param cause the causal exception
- * @exception Throwable controller initiated exception
+ * @exception InvocationTargetException throw after logging event
*/
public void failed( CommissionerEvent event, Throwable cause )
throws InvocationTargetException
{




  • r1246 - in trunk/main: station/server/src/main/net/dpml/station/server util/job/api util/job/api/src/main/net/dpml/job util/job/impl util/job/impl/src/main/net/dpml/job/impl util/job/impl/src/test/net/dpml/job/test, mcconnell at BerliOS, 03/22/2006

Archive powered by MHonArc 2.6.24.

Top of Page