Skip to content
Permalink
Browse files

Merge branch 'release-0.4'

  • Loading branch information...
bwkimmel committed Sep 30, 2017
2 parents f83727b + d2ac305 commit 630c5150c245054e2556ff370f4bad2ec793dfb7
Showing with 126 additions and 1,169 deletions.
  1. +2 −0 .gitignore
  2. +16 −5 jdcp-console/pom.xml
  3. +2 −2 jdcp-console/src/main/java/ca/eandb/jdcp/client/Configuration.java
  4. +12 −0 jdcp-console/src/main/java/ca/eandb/jdcp/client/ScriptFacade.java
  5. +0 −8 jdcp-console/src/main/java/ca/eandb/jdcp/console/ConsoleMain.java
  6. +12 −0 jdcp-console/src/main/java/ca/eandb/jdcp/console/WorkerState.java
  7. +2 −2 jdcp-core/pom.xml
  8. +15 −4 jdcp-server-app/pom.xml
  9. +1 −1 jdcp-server-app/src/main/java/ca/eandb/jdcp/server/JobServerMain.java
  10. +1 −1 jdcp-server/pom.xml
  11. +15 −4 jdcp-worker-app/pom.xml
  12. +0 −3 jdcp-worker-app/src/main/java/ca/eandb/jdcp/worker/ConnectionDialog.java
  13. +0 −42 jdcp-worker-app/src/main/java/ca/eandb/jdcp/worker/MainWindow.java
  14. +0 −42 jdcp-worker-app/src/main/java/ca/eandb/jdcp/worker/PreferencesDialog.java
  15. +9 −4 jdcp-worker/pom.xml
  16. +0 −195 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/PersistenceCachingJobServiceClassLoaderStrategy.java
  17. +0 −142 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/win32/GDI32.java
  18. +12 −222 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/win32/Kernel32.java
  19. +8 −297 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/win32/User32.java
  20. +0 −163 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/win32/W32API.java
  21. +0 −20 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/win32/W32Errors.java
  22. +5 −5 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/win32/Win32PowerCourtesyMonitor.java
  23. +9 −2 pom.xml
  24. +5 −5 src/assembly/bin.xml
@@ -7,3 +7,5 @@ target/
.classpath
dependency-reduced-pom.xml
pom.xml.versionsBackup
.idea
*.iml
@@ -6,7 +6,7 @@
<parent>
<groupId>ca.eandb.jdcp</groupId>
<artifactId>jdcp</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
</parent>
<artifactId>jdcp-console</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
@@ -17,7 +17,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<version>3.1.0</version>
<executions>
<execution>
<phase>package</phase>
@@ -35,11 +35,22 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<version>3.1.0</version>
<configuration>
<descriptor>${project.parent.basedir}/src/assembly/bin.xml</descriptor>
<descriptors>
<descriptor>${project.parent.basedir}/src/assembly/bin.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
@@ -48,7 +59,7 @@
<dependency>
<groupId>ca.eandb.util</groupId>
<artifactId>eandb-util</artifactId>
<version>0.2.2</version>
<version>0.2.3</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -76,8 +76,8 @@
private JobService service = null;

/**
* Obtains the <code>JobService</code> to use for this client session.
* @return
* Gets the <code>JobService</code> to use for this client session.
* @return the <code>JobService</code> to use for this client session
*/
public JobService getJobService() {
if (service == null) {
@@ -53,6 +53,8 @@ public ScriptFacade(Configuration config) {
* Sets the time (in seconds) that the JDCP server will instruct workers to
* idle if there are no jobs to be processed.
* @param seconds The idle time (in seconds).
* @throws Exception if an error occurs in delegating the request to the
* configured job service
*/
public void setIdleTime(int seconds) throws Exception {
config.getJobService().setIdleTime(seconds);
@@ -63,6 +65,8 @@ public void setIdleTime(int seconds) throws Exception {
* @param jobId The <code>UUID</code> of the job for which to set the
* priority.
* @param priority The priority to assign to the job.
* @throws Exception if an error occurs in delegating the request to the
* configured job service
*/
public void setJobPriority(UUID jobId, int priority) throws Exception {
config.getJobService().setJobPriority(jobId, priority);
@@ -71,6 +75,8 @@ public void setJobPriority(UUID jobId, int priority) throws Exception {
/**
* Cancel the specified job.
* @param jobId The <code>UUID</code> identifying the job to cancel.
* @throws Exception if an error occurs in delegating the request to the
* configured job service
*/
public void cancelJob(UUID jobId) throws Exception {
config.getJobService().cancelJob(jobId);
@@ -80,6 +86,8 @@ public void cancelJob(UUID jobId) throws Exception {
* Cancel the specified job.
* @param jobId A <code>String</code> representation of the
* <code>UUID</code> identifying the job to cancel.
* @throws Exception if an error occurs in delegating the request to the
* configured job service
*/
public void cancelJob(String jobId) throws Exception {
cancelJob(UUID.fromString(jobId));
@@ -89,6 +97,8 @@ public void cancelJob(String jobId) throws Exception {
* Submits a job to be processed.
* @param job The <code>ParallelizableJob</code> to submit.
* @return The <code>UUID</code> identifying the submitted job.
* @throws Exception if an error occurs in delegating the request to the
* configured job service
*/
public UUID submitJob(ParallelizableJob job) throws Exception {
return submitJob(job, job.getClass().getSimpleName());
@@ -99,6 +109,8 @@ public UUID submitJob(ParallelizableJob job) throws Exception {
* @param job The <code>ParallelizableJob</code> to submit.
* @param description A description of the job.
* @return The <code>UUID</code> identifying the submitted job.
* @throws Exception if an error occurs in delegating the request to the
* configured job service
*/
public UUID submitJob(ParallelizableJob job, String description) throws Exception {
return config.getJobService().submitJob(
@@ -42,16 +42,8 @@
import ca.eandb.util.args.StringFieldOption;
import ca.eandb.util.args.UnrecognizedCommand;

/**
* @author Brad
*
*/
public final class ConsoleMain {

/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
Properties props = new Properties(System.getProperties());
props.load(ConsoleMain.class.getResourceAsStream("system.properties"));
@@ -96,6 +96,18 @@
* @param host The name of the host to connect to.
* @param username The user name to log in with.
* @param password The password to log in with.
* @param internal If set, class definitions downloaded from the server will
* be cached in memory only. Otherwise, class definitions will be
* persisted to a database.
* @param courtesyCommand an optional shell command to be invoked
* periodically to query whether to continue processing worker tasks. If
* the shell script returns a non-zero exit code, worker tasks will be
* suspended. Worker tasks will resume when the shell script returns an
* exit code of zero.
* @param courtesyWorkingDirectory the working directory in which to run the
* {@code courtesyCommand} shell script
* @param courtesyPollingInterval the number of seconds between invocations
* of the {@code courtesyCommand} shell script
*/
@CommandArgument
public void start(
@@ -6,7 +6,7 @@
<parent>
<groupId>ca.eandb.jdcp</groupId>
<artifactId>jdcp</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
</parent>
<artifactId>jdcp-core</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
@@ -15,7 +15,7 @@
<dependency>
<groupId>ca.eandb.util</groupId>
<artifactId>eandb-util</artifactId>
<version>0.2.2</version>
<version>0.2.3</version>
</dependency>
</dependencies>
</project>
@@ -6,7 +6,7 @@
<parent>
<groupId>ca.eandb.jdcp</groupId>
<artifactId>jdcp</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
</parent>
<artifactId>jdcp-server-app</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
@@ -17,7 +17,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<version>3.1.0</version>
<executions>
<execution>
<phase>package</phase>
@@ -35,11 +35,22 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<version>3.1.0</version>
<configuration>
<descriptor>${project.parent.basedir}/src/assembly/bin.xml</descriptor>
<descriptors>
<descriptor>${project.parent.basedir}/src/assembly/bin.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
@@ -57,7 +57,7 @@
/**
* Runs the JDCP server application.
* @param args Command line arguments.
* @throws IOException
* @throws IOException if an I/O error occurs while running the application
*/
public static void main(String[] args) throws IOException {
Properties props = new Properties(System.getProperties());
@@ -6,7 +6,7 @@
<parent>
<groupId>ca.eandb.jdcp</groupId>
<artifactId>jdcp</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
</parent>
<artifactId>jdcp-server</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
@@ -6,7 +6,7 @@
<parent>
<groupId>ca.eandb.jdcp</groupId>
<artifactId>jdcp</artifactId>
<version>0.4.1</version>
<version>0.4.2</version>
</parent>
<artifactId>jdcp-worker-app</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
@@ -17,7 +17,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<version>3.1.0</version>
<executions>
<execution>
<phase>package</phase>
@@ -35,11 +35,22 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<version>3.1.0</version>
<configuration>
<descriptor>${project.parent.basedir}/src/assembly/bin.xml</descriptor>
<descriptors>
<descriptor>${project.parent.basedir}/src/assembly/bin.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
@@ -82,9 +82,6 @@
private int timeout = 0;
private Thread timeoutThread = null;

/**
* @param owner
*/
public ConnectionDialog(Frame owner) {
super(owner, true);
initialize();
@@ -132,11 +132,6 @@

};

/**
* This method initializes jSplitPane
*
* @return javax.swing.JSplitPane
*/
private JSplitPane getJSplitPane() {
if (jSplitPane == null) {
jSplitPane = new JSplitPane();
@@ -150,23 +145,13 @@ private JSplitPane getJSplitPane() {
return jSplitPane;
}

/**
* This method initializes progressPanel
*
* @return ca.eandb.util.progress.ProgressPanel
*/
private ProgressPanel getProgressPanel() {
if (progressPanel == null) {
progressPanel = new ProgressPanel();
}
return progressPanel;
}

/**
* This method initializes consolePane
*
* @return javax.swing.JEditorPane
*/
private JEditorPane getConsolePane() {
if (consolePane == null) {
consolePane = new JEditorPane();
@@ -176,11 +161,6 @@ private JEditorPane getConsolePane() {
return consolePane;
}

/**
* This method initializes consoleScrollPane
*
* @return javax.swing.JScrollPane
*/
private JScrollPane getConsoleScrollPane() {
if (consoleScrollPane == null) {
consoleScrollPane = new JScrollPane();
@@ -189,10 +169,6 @@ private JScrollPane getConsoleScrollPane() {
return consoleScrollPane;
}

/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
Properties props = new Properties(System.getProperties());
props.load(MainWindow.class.getResourceAsStream("system.properties"));
@@ -240,18 +216,10 @@ public MainWindow(Options options) {
initialize();
}

/**
* This is the default constructor
*/
public MainWindow() {
this(new Options());
}

/**
* This method initializes this
*
* @return void
*/
private void initialize() {
this.setSize(300, 200);
this.setContentPane(getJContentPane());
@@ -305,11 +273,6 @@ public void actionPerformed(ActionEvent e) {
startWorker();
}

/**
* Initializes the system tray icon.
*
* REQUIRES JAVA SE 6 OR HIGHER.
*/
private void initializeSystemTray() {
if (SystemTray.isSupported()) {

@@ -616,11 +579,6 @@ private void setStatus(final String status) {
statusLabel.setText(" " + status);
}

/**
* This method initializes jContentPane
*
* @return javax.swing.JPanel
*/
private JPanel getJContentPane() {
if (jContentPane == null) {
statusLabel = new JLabel();

0 comments on commit 630c515

Please sign in to comment.
You can’t perform that action at this time.