[jboss-svn-commits] JBL Code SVN: r13543 - in labs/jbossesb/workspace/dbevenius/wslistener/product: rosetta/tests/src/org/jboss/soa/esb/listeners/gateway and 2 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Jul 16 05:58:00 EDT 2007
Author: beve
Date: 2007-07-16 05:58:00 -0400 (Mon, 16 Jul 2007)
New Revision: 13543
Modified:
labs/jbossesb/workspace/dbevenius/wslistener/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/AbstractFileGateway.java
labs/jbossesb/workspace/dbevenius/wslistener/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/AbstractScheduler.java
labs/jbossesb/workspace/dbevenius/wslistener/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JobListenerAdapter.java
labs/jbossesb/workspace/dbevenius/wslistener/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/AbstractSchedulerUnitTest.java
labs/jbossesb/workspace/dbevenius/wslistener/product/services/soap/src/main/java/org/jboss/soa/esb/listeners/gateway/AbstractWSGateway.java
labs/jbossesb/workspace/dbevenius/wslistener/product/services/soap/src/test/java/org/jboss/soa/esb/listeners/gateway/AbstractWSGatewayUnitTest.java
Log:
Minor refactoring and updated javadoc.
Modified: labs/jbossesb/workspace/dbevenius/wslistener/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/AbstractFileGateway.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/wslistener/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/AbstractFileGateway.java 2007-07-16 08:42:30 UTC (rev 13542)
+++ labs/jbossesb/workspace/dbevenius/wslistener/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/AbstractFileGateway.java 2007-07-16 09:58:00 UTC (rev 13543)
@@ -116,7 +116,7 @@
/**
* Execute on the thread.
*/
- protected void performGatewayOperation() {
+ protected void performWork() {
EPR replyEpr = null;
Message replyMsg = null;
Modified: labs/jbossesb/workspace/dbevenius/wslistener/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/AbstractScheduler.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/wslistener/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/AbstractScheduler.java 2007-07-16 08:42:30 UTC (rev 13542)
+++ labs/jbossesb/workspace/dbevenius/wslistener/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/AbstractScheduler.java 2007-07-16 09:58:00 UTC (rev 13543)
@@ -48,9 +48,37 @@
/**
* AbstractScheduler
* </p>
- * Implements the behaviour for triggering ...
+ * An AbstractScheduler extended to add scheduling capabilities to
+ * sub classes. <br>
+ * This implementation uses Quartz.More information about the Quartz can be found here
+ * http://www.opensymphony.com/quartz/api/"
+ * </p>
+ * The scheduling can be configured by:
+ * <ul>
+ * <li> cronExpression
+ * <li> pollLatency and optionally a repeatCount
+ * </ul>
*
+ * <pre>
+ * Example of cron expression configuration:
+ * <property name="cronExpression" value="0/20 * * * * ?"/>
+ * <property name="startDate" value="0/20 * * * * ?"/>
+ * <property name="endDate" value="0/20 * * * * ?"/>
+ * </pre>
+ * <pre>
+ * Example of pollLatency configuration:
+ * <property name="pollLatencySeconds" value="10"/>
+ * <property name="repeatCount" value="10"/>
+ * <property name="startDate" value="0/20 * * * * ?"/>
+ * <property name="endDate" value="0/20 * * * * ?"/>
+ * </pre>
+ * Note tha startDate and endDate are optional.<br>
+ * If a startDate is not specified thenthe time will start immedietly. <br>
+ * If endDate is not specified the it will run
+ * indefinetly.
+ *
* @author <a href="daniel.bevenius at redpill.se">Daniel Bevenius</a>
+ * @since 4.2
*
*/
public abstract class AbstractScheduler extends AbstractThreadedManagedLifecycle
@@ -100,7 +128,7 @@
* </p>
*
*/
- protected abstract void performGatewayOperation();
+ protected abstract void performWork();
@Override
protected void doInitialise() throws ManagedLifecycleException
Modified: labs/jbossesb/workspace/dbevenius/wslistener/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JobListenerAdapter.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/wslistener/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JobListenerAdapter.java 2007-07-16 08:42:30 UTC (rev 13542)
+++ labs/jbossesb/workspace/dbevenius/wslistener/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JobListenerAdapter.java 2007-07-16 09:58:00 UTC (rev 13543)
@@ -50,7 +50,7 @@
{
log.info( "jobWasExceuted.." );
if ( gateway != null )
- gateway.performGatewayOperation();
+ gateway.performWork();
else
log.warn( "gateway was null, when job fired!!");
}
Modified: labs/jbossesb/workspace/dbevenius/wslistener/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/AbstractSchedulerUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/wslistener/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/AbstractSchedulerUnitTest.java 2007-07-16 08:42:30 UTC (rev 13542)
+++ labs/jbossesb/workspace/dbevenius/wslistener/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/AbstractSchedulerUnitTest.java 2007-07-16 09:58:00 UTC (rev 13543)
@@ -171,7 +171,7 @@
}
@Override
- protected void performGatewayOperation()
+ protected void performWork()
{
log.debug( "Performing mock gateway operation" );
hasRun = true;
Modified: labs/jbossesb/workspace/dbevenius/wslistener/product/services/soap/src/main/java/org/jboss/soa/esb/listeners/gateway/AbstractWSGateway.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/wslistener/product/services/soap/src/main/java/org/jboss/soa/esb/listeners/gateway/AbstractWSGateway.java 2007-07-16 08:42:30 UTC (rev 13542)
+++ labs/jbossesb/workspace/dbevenius/wslistener/product/services/soap/src/main/java/org/jboss/soa/esb/listeners/gateway/AbstractWSGateway.java 2007-07-16 09:58:00 UTC (rev 13543)
@@ -186,7 +186,7 @@
* </lu>
*/
@Override
- protected void performGatewayOperation()
+ protected void performWork()
{
log.debug( " ---------- performingGatewayOperation ----------------");
@@ -396,7 +396,6 @@
soapParameters = getParameters( configTree );
resolveRepsonseClass( configTree );
maxMillisForResponse = ListenerUtil.getMaxMillisGatewayWait( configTree, log, responseMethod != null );
- log.debug( "maxMillisForResponse : " + maxMillisForResponse );
}
protected void resolveRepsonseClass(final ConfigTree configTree ) throws ConfigurationException
Modified: labs/jbossesb/workspace/dbevenius/wslistener/product/services/soap/src/test/java/org/jboss/soa/esb/listeners/gateway/AbstractWSGatewayUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/wslistener/product/services/soap/src/test/java/org/jboss/soa/esb/listeners/gateway/AbstractWSGatewayUnitTest.java 2007-07-16 08:42:30 UTC (rev 13542)
+++ labs/jbossesb/workspace/dbevenius/wslistener/product/services/soap/src/test/java/org/jboss/soa/esb/listeners/gateway/AbstractWSGatewayUnitTest.java 2007-07-16 09:58:00 UTC (rev 13543)
@@ -29,9 +29,7 @@
import static org.jboss.soa.esb.listeners.ListenerTagNames.GATEWAY_RESPONDER_METHOD_TAG;
import static org.jboss.soa.esb.listeners.gateway.AbstractWSGateway.ATTR_OPERATION;
import static org.jboss.soa.esb.listeners.gateway.AbstractWSGateway.ATTR_SOAP_HEADER;
-import static org.jboss.soa.esb.listeners.gateway.AbstractWSGateway.ATTR_SOAP_HEADERS;
import static org.jboss.soa.esb.listeners.gateway.AbstractWSGateway.ATTR_SOAP_PARAMETER;
-import static org.jboss.soa.esb.listeners.gateway.AbstractWSGateway.ATTR_SOAP_PARAMETERS;
import static org.jboss.soa.esb.listeners.gateway.AbstractWSGateway.ATTR_WSDL;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -42,8 +40,6 @@
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.actions.ActionProcessingException;
import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
-import org.jboss.soa.esb.listeners.ListenerUtil;
import org.jboss.soa.esb.message.Message;
import org.junit.Test;
@@ -137,7 +133,6 @@
gateway.resolveRepsonseClass( tree );
}
-
/**
* Produces the following ConfigTree:
*
@@ -162,7 +157,7 @@
}
/**
- * Produces the following ConfigTree:
+ * Produces the equivelent of the:
*
* <AbstractPollingGatewayUnitTest operation="ZZZ" pollLatencySeconds="10"
* target-service-category="wsCatetory"
@@ -179,6 +174,8 @@
{
ConfigTree tree = createConfigTree( 10 );
+ // even though this might look wrong this is how the configtree
+ // looks like when passed to the constructor at runtime
ConfigTree property1 = new ConfigTree( ATTR_SOAP_HEADER, tree );
property1.setAttribute( "name", "param1");
property1.setAttribute( "value", "value1" );
@@ -191,7 +188,7 @@
}
/**
- * Produces the following ConfigTree:
+ * Produces the equivelent of the:
*
* <AbstractPollingGatewayUnitTest operation="ZZZ" pollLatencySeconds="10"
* target-service-category="wsCatetory"
More information about the jboss-svn-commits
mailing list