Starting to move to java 11[Do Not Merge]

All version changes are present.

Fixed all Java-Doc Errors and warnings

* Due to the stricter nature of the javadoc compiler we can't wrap <ul> / <ui> in <p>
* We will also need to Push up a test app for taklauncher to work with.   The old one fails to start now.   Or use one of the task starters possibly.
* Built on the work from TASK-439C.   Wait for that merge before merging this one.
* Replaced applicationFailedEvent class attribute with applicaitonFailedException
* Also polished the app used by the taskLauncherSink integration test
This commit is contained in:
Glenn Renfro
2018-10-02 14:18:03 -04:00
parent 90c88c52e6
commit c7ef7fbff4
30 changed files with 71 additions and 53 deletions

View File

@@ -16,6 +16,7 @@
package org.springframework.cloud.task.batch.listener;
import org.springframework.batch.core.ItemProcessListener;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.cloud.task.batch.listener.support.BatchJobHeaders;
import org.springframework.cloud.task.batch.listener.support.MessagePublisher;
import org.springframework.core.Ordered;
@@ -30,7 +31,7 @@ import org.springframework.util.Assert;
* was filtered ({@link ItemProcessor} returned null), if the result of the processor was
* equal to the input (via <code>.equals</code>), or if they were not equal.
* {@link ItemProcessListener#onProcessError(Object, Exception)} provides the exception
* via the {@link BatchJobHeaders.BATCH_EXCEPTION} message header.
* via the {@link BatchJobHeaders#BATCH_EXCEPTION} message header.
*
* @author Michael Minella
* @author Glenn Renfro

View File

@@ -20,6 +20,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.batch.core.ItemReadListener;
import org.springframework.batch.item.ItemReader;
import org.springframework.cloud.task.batch.listener.support.BatchJobHeaders;
import org.springframework.cloud.task.batch.listener.support.MessagePublisher;
import org.springframework.core.Ordered;
@@ -32,7 +33,7 @@ import org.springframework.util.Assert;
* The {@link ItemReadListener#beforeRead()} and
* {@link ItemReadListener#afterRead(Object)} are both no-ops in this implementation.
* {@link ItemReadListener#onReadError(Exception)} provides the exception
* via the {@link BatchJobHeaders.BATCH_EXCEPTION} message header.
* via the {@link BatchJobHeaders#BATCH_EXCEPTION} message header.
*
* @author Glenn Renfro
* @author Ali Shahbour

View File

@@ -33,7 +33,7 @@ import org.springframework.util.Assert;
*
* Each method provides an informational message.
* {@link ItemWriteListener#onWriteError(Exception, List)} provides a message as well as
* the exception's message via the {@link BatchJobHeaders.BATCH_EXCEPTION} message header.
* the exception's message via the {@link BatchJobHeaders#BATCH_EXCEPTION} message header.
*
* @author Glenn Renfro
* @author Ali Shahbour

View File

@@ -30,7 +30,7 @@ import org.springframework.util.Assert;
* Setups up the SkipProcessListener to emit events to the spring cloud stream output channel.
*
* This listener emits the exception's message via the
* {@link BatchJobHeaders.BATCH_EXCEPTION} message header for each method. For
* {@link BatchJobHeaders#BATCH_EXCEPTION} message header for each method. For
* {@link SkipListener#onSkipInProcess(Object, Throwable)} and
* {@link SkipListener#onSkipInWrite(Object, Throwable)} the body of the message consists
* of the item that caused the error.

View File

@@ -153,14 +153,14 @@ public class JobExecutionEvent extends Entity {
}
/**
* @param exitStatus
* @param exitStatus the exit status for the job.
*/
public void setExitStatus(ExitStatus exitStatus) {
this.exitStatus = exitStatus;
}
/**
* @return the exitCode
* @return the exitCode for the job.
*/
public ExitStatus getExitStatus() {
return this.exitStatus;
@@ -230,9 +230,9 @@ public class JobExecutionEvent extends Entity {
}
/**
* Set the last time this JobExecution was updated.
* Set the last time this {@link JobExecution} was updated.
*
* @param lastUpdated
* @param lastUpdated The date the {@link JobExecution} was updated.
*/
public void setLastUpdated(Date lastUpdated) {
this.lastUpdated = lastUpdated;
@@ -245,7 +245,7 @@ public class JobExecutionEvent extends Entity {
/**
* Add the provided throwable to the failure exception list.
*
* @param t
* @param t a {@link Throwable} to be added to the exception list.
*/
public synchronized void addFailureException(Throwable t) {
this.failureExceptions.add(t);

View File

@@ -229,6 +229,7 @@ public class StepExecutionEvent extends Entity {
/**
* Setter for number of rollbacks for this execution
* @param rollbackCount the number of rollbacks for this execution
*/
public void setRollbackCount(int rollbackCount) {
this.rollbackCount = rollbackCount;
@@ -281,7 +282,7 @@ public class StepExecutionEvent extends Entity {
}
/**
* @param exitStatus
* @param exitStatus the {@link ExitStatus} for the step.
*/
public void setExitStatus(ExitStatus exitStatus) {
this.exitStatus = exitStatus;
@@ -340,7 +341,7 @@ public class StepExecutionEvent extends Entity {
/**
* Set the number of records skipped on read
*
* @param readSkipCount
* @param readSkipCount the number of records to be skipped on read.
*/
public void setReadSkipCount(int readSkipCount) {
this.readSkipCount = readSkipCount;
@@ -349,7 +350,7 @@ public class StepExecutionEvent extends Entity {
/**
* Set the number of records skipped on write
*
* @param writeSkipCount
* @param writeSkipCount the number of records to be skipped on write.
*/
public void setWriteSkipCount(int writeSkipCount) {
this.writeSkipCount = writeSkipCount;
@@ -365,7 +366,7 @@ public class StepExecutionEvent extends Entity {
/**
* Set the number of records skipped during processing.
*
* @param processSkipCount
* @param processSkipCount the number of records skip during processing.
*/
public void setProcessSkipCount(int processSkipCount) {
this.processSkipCount = processSkipCount;
@@ -381,7 +382,7 @@ public class StepExecutionEvent extends Entity {
/**
* Set the time when the StepExecution was last updated before persisting
*
* @param lastUpdated
* @param lastUpdated the {@link Date} the StepExecution was last updated.
*/
public void setLastUpdated(Date lastUpdated) {
this.lastUpdated = lastUpdated;

View File

@@ -41,20 +41,20 @@ import org.springframework.util.ReflectionUtils;
/**
* Attaches the listeners to the job and its steps.
* Based on the type of bean that is being processed will determine what listener is attached.
* <p>
* <ul>
* <li>If the bean is of type AbstactJob then the JobExecutionListener is registered with this bean.</li>
* <li>If the bean is of type AbstactStep then the StepExecutionListener is registered with this bean.</li>
* <li>If the bean is of type TaskletStep then the ChunkEventListener is registered with this bean.</li>
* <li>If the tasklet for the TaskletStep is of type ChunkOrientedTasklet the following listeners will be registered. </li>
* <li>
* <ul>
* <li>ItemReadListener with the ChunkProvider.</li>
* <li>ItemProcessListener with the ChunkProcessor.</li>
* <li>ItemWriteEventsListener with the ChunkProcessor.</li>
* <li>SkipEventsListener with the ChunkProcessor.</li>
* </ul>
* </li>
* </ul>
* </p>
* @author Michael Minella
* @author Glenn Renfro
*/

View File

@@ -50,8 +50,8 @@ public class TaskLaunchRequest implements Serializable{
* @param environmentProperties are the environment variables for this task.
* @param deploymentProperties are the variables used to setup task on the platform.
* @param applicationName name to be applied to the launched task. If set
* to null then the launched task name will be "Task-<hash code of the
* TaskLaunchRequest>.
* to null then the launched task name will be "Task-`hash code of the
* TaskLaunchRequest`.
*/
public TaskLaunchRequest(String uri, List<String> commandlineArguments,
Map<String, String> environmentProperties,
@@ -75,14 +75,14 @@ public class TaskLaunchRequest implements Serializable{
}
/**
* Returns the current uri to the artifact for this launch request.
* @return the current uri to the artifact for this launch request.
*/
public String getUri() {
return uri;
}
/**
* Returns an unmodifiable list of arguments that will be used for the task execution
* @return an unmodifiable list of arguments that will be used for the task execution
*/
public List<String> getCommandlineArguments() {
return Collections.unmodifiableList(commandlineArguments);
@@ -117,7 +117,7 @@ public class TaskLaunchRequest implements Serializable{
/**
* Sets the name to be applied to the launched task. If set
* to null then the launched task name will be "Task-<unique id>".
* to null then the launched task name will be "Task-`unique id`".
*
* @param applicationName the name to be
*/

View File

@@ -52,6 +52,7 @@ public class TaskLauncherSink {
* Launches a task upon the receipt of a valid TaskLaunchRequest.
* @param taskLaunchRequest is a TaskLaunchRequest containing the information required to launch
* a task.
* @throws Exception if error occurs during task launch.
*/
@ServiceActivator(inputChannel = Sink.INPUT)
public void taskLauncherSink(TaskLaunchRequest taskLaunchRequest) throws Exception{