Skip to content

Commit

Permalink
POM Clean up and update to javadoc plugin with minor corrections
Browse files Browse the repository at this point in the history
Signed-off-by: smillidge <steve.millidge@payara.fish>
  • Loading branch information
smillidge committed Aug 12, 2020
1 parent adfa343 commit cc2125c
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 58 deletions.
19 changes: 10 additions & 9 deletions api/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -151,7 +151,7 @@
<configuration>
<spec>
<specVersion>${spec.version}</specVersion>
<specImplVersion>2.0.0-RC1</specImplVersion>
<specImplVersion>2.0.0</specImplVersion>
<apiPackage>${api_package}</apiPackage>

<nonFinal>${non.final}</nonFinal>
Expand Down Expand Up @@ -204,8 +204,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -236,12 +236,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8</version>
<version>3.2.0</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
<doctitle>Jakarta Concurrency ${project.version} specification</doctitle>
<doctitle>Jakarta Concurrency ${project.version} API specification</doctitle>
<header><![CDATA[<br>Jakarta Concurrency API v${project.version}]]></header>
<bottom>
<![CDATA[Copyright (c) 2019 Eclipse Foundation.
<![CDATA[Copyright (c) 2020 Eclipse Foundation.
Use is subject to
<a href="{@docRoot}/doc-files/speclicense.html" target="_top">license terms</a>.
]]>
Expand All @@ -261,7 +262,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<version>3.2.0</version>
<executions>
<execution>
<id>add-resource</id>
Expand Down Expand Up @@ -333,7 +334,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<version>4.13</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -51,7 +51,7 @@
* recommended. Jakarta EE product providers may impose limits to the
* size of the keys and values.
* </ul>
* <P>
* <p>
*
* @since 1.0
*/
Expand All @@ -72,7 +72,7 @@ public interface ContextService {
* <p>
* For example, to execute a Runnable which is contextualized with the
* creator's context using a Java&trade; SE ExecutorService:
* <P>
*
* <pre>
* public class MyRunnable implements Runnable {
* public void run() {
Expand All @@ -95,10 +95,11 @@ public interface ContextService {
*
* Future f = exSvc.submit(rProxy);
* </pre>
* <P>
* <p>
*
* @param instance the instance of the object to proxy.
* @param intf the interface that the proxy should implement.
* @param <T> the type of the instance to proxy
* @return a proxy for the input object that implements the specified interface.
* @throws java.lang.IllegalArgumentException - if the {@code intf} argument
* is null or the instance does not implement the specified
Expand All @@ -113,9 +114,9 @@ public interface ContextService {
* This method is similar to {@code <T> T createContextualProxy(T instance, Class<T> intf)}
* except that this method can be used if the proxy has to support multiple
* interfaces.
* <p>
* </p>
* Example:
* <P>
*
* <pre>
* public class MyRunnableWork implements Runnable, SomeWorkInterface {
* public void run() {
Expand Down Expand Up @@ -143,7 +144,7 @@ public interface ContextService {
* // submit the proxy as a Runnable to the ExecutorService
* Future f = exSvc.submit( (Runnable)proxy);
* </pre>
* <P>
*
*
* @param instance the instance of the object to proxy.
* @param interfaces the interfaces that the proxy should implement.
Expand Down Expand Up @@ -174,7 +175,7 @@ public interface ContextService {
*
* For example, to call a Message Driven Bean (MDB) with the sender's
* context, but within the MDB's transaction:
* <P>
*
* <pre>
* public class MyServlet ... {
* public void doPost() throws NamingException, JMSException {
Expand Down Expand Up @@ -234,12 +235,13 @@ public interface ContextService {
* }
* }
*</pre>
*<P>
*
*
* @param instance the instance of the object to proxy.
* @param executionProperties the properties to use when creating and running the context
* object.
* @param intf the interface that the proxy should implement.
* @param <T> the type of the interface
* @return a proxy for the input object that implements the specified interface.
*
* @throws java.lang.IllegalArgumentException - if the {@code intf} argument
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -44,9 +44,9 @@
* and are run within the application component context that submitted the task.
* All tasks run without an explicit transaction (they do not enlist in the application
* component's transaction). If a transaction is required, use a
* {@link jakarta.transaction.UserTransaction} instance. A UserTransaction instance is
* {@code jakarta.transaction.UserTransaction} instance. A UserTransaction instance is
* available in JNDI using the name: &quot;java:comp/UserTransaction&quot; or by
* requesting an injection of a {@link jakarta.transaction.UserTransaction} object
* requesting an injection of a {@code jakarta.transaction.UserTransaction} object
* using the {@code Resource} annotation.
* <p>
* Example:
Expand Down Expand Up @@ -151,7 +151,7 @@
* }
* }
*
* public class RDBAccountRetriever implements Callable&lt;Account>&gt; {
* public class RDBAccountRetriever implements Callable&lt;Account&gt; {
* public Account call() {
* // Connect to our database and retrieve the info for the account.
* //...
Expand All @@ -162,7 +162,7 @@
* // Some account data...
* }
* </pre>
* <P>
* <p>
*
* @since 1.0
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -17,7 +17,6 @@
package jakarta.enterprise.concurrent;

import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.Callable;

Expand Down Expand Up @@ -128,6 +127,7 @@ public static Runnable managedTask(Runnable task, Map<String, String> executionP
* implements {@code ManagedTask}, and {@code taskListener} is not
* {@code null}, the {@code ManagedTaskListener} interface methods of the
* task will not be called.
* @param <V> the return type of the Callable
* @return a Callable object
* @throws IllegalArgumentException if {@code task} is {@code null}
*/
Expand All @@ -144,6 +144,7 @@ public static <V> Callable<V> managedTask(Callable<V> task, ManagedTaskListener
* {@link ManagedScheduledExecutorService}.
*
* @param task the task to have the given ManagedTaskListener associated with
* @param <V> the result type of the Callable
* @param taskListener (optional) the {@code ManagedTaskListener} to receive
* lifecycle events notification when the task is submitted. If {@code task}
* implements {@code ManagedTask}, and {@code taskListener} is not
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -41,8 +41,8 @@
* All tasks run without an explicit transaction (they do not enlist in the application
* component's transaction). If a transaction is required, use a
* {@code jakarta.transaction.UserTransaction} instance. A UserTransaction instance is
* available in JNDI using the name: &QUOT;java:comp/UserTransaction&QUOT or by
* requesting an injection of a {@link jakarta.transaction.UserTransaction} object
* available in JNDI using the name: &quot;java:comp/UserTransaction&quot; or by
* requesting an injection of a {@code jakarta.transaction.UserTransaction} object
* using the {@code Resource} annotation.<p>
*
* Example:
Expand All @@ -58,19 +58,19 @@
*
* ut.commit();
* }
* </PRE>
* </pre>
* Tasks can optionally provide an {@link ManagedTaskListener} to receive
* notifications of lifecycle events, through the use of {@link ManagedTask}
* interface.
* <p>
*
* Asynchronous tasks are typically submitted to the ManagedScheduledExecutorService using one
* of the <code>submit</code> or <code>schedule</code>methods, each of which return a <CODE>Future</CODE>
* of the <code>submit</code> or <code>schedule</code>methods, each of which return a <code>Future</code>
* instance. The Future represents the result of the task and can also be used to
* check if the task is complete or wait for its completion.<p>
*
* If the task is cancelled, the result for the task is a
* <CODE>CancellationException</CODE> exception. If the task is unable
* <code>CancellationException</code> exception. If the task is unable
* to run due to start due to a reason other than cancellation, the result is a
* {@link AbortedException} exception. If the task is scheduled
* with a {@link Trigger} and the Trigger forces the task to be skipped,
Expand All @@ -84,9 +84,9 @@
* and multiple results are expected.<p>
*
* For example, if a task is repeating, the lifecycle of the task would be:<br>
* (Note: See {@link ManagedTaskListener} for task lifecycle management details.)<p>
* (Note: See {@link ManagedTaskListener} for task lifecycle management details.)
*
* <table>
* <table summary="Task Lifecycle">
* <tr><td valign="top"><strong>Sequence</strong></td><td valign="top"><strong>State</strong></td><td valign="top"><strong>Action</strong></td><td valign="top"><strong>Listener</strong></td><td valign="top"><strong>Next state</strong></td></tr>
*
* <tr><td valign="top">1A.</td><td valign="top">None</td><td valign="top">submit()</td><td valign="top">taskSubmitted</td><td valign="top">Submitted</td></tr>
Expand All @@ -98,7 +98,7 @@
* <tr><td valign="top">3B.</td><td valign="top">Started</td><td valign="top">Exit run()</td><td valign="top">taskDone</td><td valign="top">Reschedule</td></tr>
*
* </table>
* <P>
*
*
* @since 1.0
*/
Expand Down Expand Up @@ -127,6 +127,7 @@ public java.util.concurrent.ScheduledFuture<?> schedule(java.lang.Runnable comma
*
* @param callable the function to execute.
* @param trigger the trigger that determines when the task should fire.
* @param <V> the return type of the <code>Callable</code>
*
* @return a ScheduledFuture that can be used to extract result or cancel.
*
Expand Down
10 changes: 5 additions & 5 deletions api/src/main/java/jakarta/enterprise/concurrent/ManagedTask.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -53,22 +53,22 @@ public interface ManagedTask {
* <p>
* "SUSPEND" (the default if unspecified) - Any transaction that is currently
* active on the thread will be suspended and a
* {@link jakarta.transaction.UserTransaction} (accessible in the local
* {@code jakarta.transaction.UserTransaction} (accessible in the local
* JNDI namespace as "java:comp/UserTransaction") will be available. The
* original transaction, if any was active on the thread, will be resumed
* when the task or contextual proxy object method returns.
*
* <p>
* "USE_TRANSACTION_OF_EXECUTION_THREAD" - The contextual proxy object method
* will run within the transaction (if any) of the execution thread. A
* {@link jakarta.transaction.UserTransaction} will only be available if it is
* {@code jakarta.transaction.UserTransaction} will only be available if it is
* also available in the execution thread (for example, when the proxy method
* is invoked from a Servlet or Bean Managed Transaction). When there is
* no existing transaction on the execution thread, such as when running tasks
* that are submitted to a {@link ManagedExecutorService} or a
* {@link ManagedScheduledExecutorService}, a
* {@link jakarta.transaction.UserTransaction} will be available.
* <P>
* {@code jakarta.transaction.UserTransaction} will be available.
* </p>
*/
public static final String TRANSACTION = "jakarta.enterprise.concurrent.TRANSACTION";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -26,7 +26,7 @@
* Each listener method will run with unspecified context.
* All listeners run without an explicit transaction
* (they do not enlist in the application component's transaction). If a transaction is required, use a
* {@link jakarta.transaction.UserTransaction} instance.
* {@code jakarta.transaction.UserTransaction} instance.
* <p>
*
* Each listener instance will be invoked within the same process in which the listener was registered.
Expand All @@ -43,10 +43,10 @@
* ManagedTaskListener is associated with a task. Each method is invoked
* when the state of the {@link Future} moves from one state to another.
* <p>
* <img src="doc-files/TaskListener_StateDiagram.gif"><p>
* <img src="doc-files/TaskListener_StateDiagram.gif" alt="Task Listener State Diagram"><p>
*
* <b>A. The task runs normally:</b>
* <table>
* <table summary="Task Listener State Normal">
* <tr><td valign="top"><strong><u>Sequence</u></strong></td><td valign="top"><strong><u>State</u></strong></td><td valign="top"><strong><u>Action</u></strong></td><td valign="top"><strong><u>Listener</u></strong></td><td valign="top"><strong><u>Next state</u></strong></td></tr>
*
* <tr><td valign="top">1.</td><td valign="top">None</td><td valign="top">submit()</td><td valign="top">taskSubmitted</td><td valign="top">Submitted</td></tr>
Expand All @@ -56,7 +56,7 @@
* </table><p>
*
* <b>B. The task is cancelled during taskSubmitted():</b>
* <table>
* <table summary="Task Listener State Cancelled during taskSubmitted">
* <tr><td valign="top"><strong><u>Sequence</u></strong></td><td valign="top"><strong><u>State</u></strong></td><td valign="top"><strong><u>Action</u></strong></td><td valign="top"><strong><u>Listener</u></strong></td><td valign="top"><strong><u>Next state</u></strong></td></tr>
* <tr><td valign="top">1.</td><td valign="top">None</td><td valign="top">submit()</td><td valign="top">taskSubmitted<br>Future is cancelled.</td><td valign="top">Cancelling</td></tr>
*
Expand All @@ -66,7 +66,7 @@
*
* <b>C. The task is cancelled or aborted after submitted, but before started:</b>
*
* <table>
* <table summary="Task Listener State Cancelled after submitted but before started">
* <tr><td valign="top"><strong><u>Sequence</u></strong></td><td valign="top"><strong><u>State</u></strong></td><td valign="top"><strong><u>Action</u></strong></td><td valign="top"><strong><u>Listener</u></strong></td><td valign="top"><strong><u>Next state</u></strong></td></tr>
* <tr><td valign="top">1.</td><td valign="top">None</td><td valign="top">submit()</td><td valign="top">taskSubmitted</td><td valign="top">Submitted</td></tr>
* <tr><td valign="top">2.</td><td valign="top">Submitted</td><td valign="top">cancel() or abort</td><td valign="top">taskAborted</td><td valign="top">Cancelled</td></tr>
Expand All @@ -75,7 +75,7 @@
* </table> <p>
*
* <b>D. The task is cancelled when it is starting:</b>
* <table>
* <table summary="Task Listener State Cancelled when starting">
* <tr><td valign="top"><strong><u>Sequence</u></strong></td><td valign="top"><strong><u>State</u></strong></td><td valign="top"><strong><u>Action</u></strong></td><td valign="top"><strong><u>Listener</u></strong></td><td valign="top"><strong><u>Next state</u></strong></td></tr>
*
* <tr><td valign="top">1.</td><td valign="top">None</td><td valign="top">submit()</td><td valign="top">taskSubmitted</td><td valign="top">Submitted</td></tr>
Expand Down

0 comments on commit cc2125c

Please sign in to comment.