Skip to content
Permalink
Browse files

Convert line endings from DOS to Unix

  • Loading branch information...
bwkimmel committed Aug 14, 2014
1 parent fc1ee5d commit a6555f6cf98e990a3a9892e7656b0b83ccb28ca2
Showing with 8,565 additions and 8,565 deletions.
  1. +22 −22 LICENSE
  2. +60 −60 jdcp-console/src/main/java/ca/eandb/jdcp/client/ConnectCommand.java
  3. +57 −57 jdcp-console/src/main/java/ca/eandb/jdcp/client/ScriptCommand.java
  4. +41 −41 jdcp-console/src/main/java/ca/eandb/jdcp/client/ScriptFacade.java
  5. +29 −29 jdcp-console/src/main/java/ca/eandb/jdcp/client/SetIdleTimeCommand.java
  6. +82 −82 jdcp-console/src/main/java/ca/eandb/jdcp/console/ConsoleMain.java
  7. +50 −50 jdcp-console/src/main/java/ca/eandb/jdcp/console/ConsoleState.java
  8. +165 −165 jdcp-console/src/main/java/ca/eandb/jdcp/console/HubState.java
  9. +251 −251 jdcp-console/src/main/java/ca/eandb/jdcp/console/ServerState.java
  10. +352 −352 jdcp-console/src/main/java/ca/eandb/jdcp/console/WorkerState.java
  11. +49 −49 jdcp-core/src/main/java/ca/eandb/jdcp/job/AbstractParallelizableJob.java
  12. +299 −299 jdcp-core/src/main/java/ca/eandb/jdcp/job/CompositeParallelizableJob.java
  13. +155 −155 jdcp-core/src/main/java/ca/eandb/jdcp/job/DummyParallelizableJob.java
  14. +34 −34 jdcp-core/src/main/java/ca/eandb/jdcp/job/HostService.java
  15. +31 −31 jdcp-core/src/main/java/ca/eandb/jdcp/job/JobExecutionException.java
  16. +117 −117 jdcp-core/src/main/java/ca/eandb/jdcp/job/JobExecutionWrapper.java
  17. +54 −54 jdcp-core/src/main/java/ca/eandb/jdcp/job/ParallelizableJob.java
  18. +207 −207 jdcp-core/src/main/java/ca/eandb/jdcp/job/ParallelizableJobRunner.java
  19. +83 −83 jdcp-core/src/main/java/ca/eandb/jdcp/job/TaskDescription.java
  20. +140 −140 jdcp-core/src/main/java/ca/eandb/jdcp/job/TaskRandomizedJob.java
  21. +131 −131 jdcp-core/src/main/java/ca/eandb/jdcp/job/TaskReversedJob.java
  22. +23 −23 jdcp-core/src/main/java/ca/eandb/jdcp/job/TaskWorker.java
  23. +72 −72 jdcp-core/src/main/java/ca/eandb/jdcp/remote/DelegationException.java
  24. +61 −61 jdcp-core/src/main/java/ca/eandb/jdcp/remote/JobService.java
  25. +1 −1 jdcp-core/src/main/java/ca/eandb/jdcp/remote/TaskService.java
  26. +3 −3 jdcp-server-app/src/main/bin/etc/login.config
  27. +30 −30 jdcp-server-app/src/main/bin/etc/policy
  28. +2 −2 jdcp-server-app/src/main/bin/jdcp-server.bat
  29. +86 −86 jdcp-server-app/src/main/java/ca/eandb/jdcp/server/JobServerMain.java
  30. +377 −377 jdcp-server/src/main/java/ca/eandb/jdcp/hub/JobHub.java
  31. +119 −119 jdcp-server/src/main/java/ca/eandb/jdcp/hub/JobInfo.java
  32. +204 −204 jdcp-server/src/main/java/ca/eandb/jdcp/hub/ServiceInfo.java
  33. +408 −408 jdcp-server/src/main/java/ca/eandb/jdcp/hub/ServiceWrapper.java
  34. +125 −125 jdcp-server/src/main/java/ca/eandb/jdcp/server/JobInfo.java
  35. +218 −218 jdcp-server/src/main/java/ca/eandb/jdcp/server/ServiceInfo.java
  36. +192 −192 jdcp-server/src/main/java/ca/eandb/jdcp/server/ServiceWrapper.java
  37. +17 −17 jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/AbstractClassManager.java
  38. +53 −53 jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/ChildClassManager.java
  39. +18 −18 jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/ClassManager.java
  40. +453 −453 jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/DbClassManager.java
  41. +270 −270 jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/FileClassManager.java
  42. +10 −10 jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/ParentClassManager.java
  43. +52 −52 jdcp-server/src/main/java/ca/eandb/jdcp/server/classmanager/TestFileClassManager.java
  44. +1 −1 jdcp-worker-app/pom.xml
  45. +536 −536 jdcp-worker-app/src/main/java/ca/eandb/jdcp/worker/ConnectionDialog.java
  46. +653 −653 jdcp-worker-app/src/main/java/ca/eandb/jdcp/worker/MainWindow.java
  47. +491 −491 jdcp-worker-app/src/main/java/ca/eandb/jdcp/worker/PreferencesDialog.java
  48. +43 −43 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/JobServiceFactory.java
  49. +495 −495 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/ReconnectingJobService.java
  50. +174 −174 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/ThreadServiceWorker.java
  51. +87 −87 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/AsyncCourtesyMonitor.java
  52. +78 −78 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/CompositeCourtesyMonitor.java
  53. +50 −50 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/CourtesyMonitor.java
  54. +51 −51 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/CourtesyMonitorFactory.java
  55. +72 −72 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/ExecCourtesyMonitor.java
  56. +69 −69 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/PollingCourtesyMonitor.java
  57. +38 −38 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/PowerCourtesyMonitor.java
  58. +59 −59 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/StandardCourtesyMonitorFactory.java
  59. +48 −48 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/UnconditionalCourtesyMonitor.java
  60. +49 −49 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/osx/OSXCourtesyMonitorFactory.java
  61. +122 −122 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/osx/OSXPowerCourtesyMonitor.java
  62. +45 −45 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/win32/Win32CourtesyMonitorFactory.java
  63. +200 −200 jdcp-worker/src/main/java/ca/eandb/jdcp/worker/policy/win32/Win32PowerCourtesyMonitor.java
  64. +1 −1 src/assembly/bin.xml
44 LICENSE
@@ -1,22 +1,22 @@
Copyright (c) 2008 Bradley W. Kimmel
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Copyright (c) 2008 Bradley W. Kimmel

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
@@ -1,60 +1,60 @@
/*
* Copyright (c) 2008 Bradley W. Kimmel
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/

package ca.eandb.jdcp.client;

import java.util.Queue;

import ca.eandb.util.args.ArgumentProcessor;
import ca.eandb.util.args.Command;
import ca.eandb.util.args.StringFieldOption;

/**
* @author Brad
*
*/
public final class ConnectCommand implements Command<Configuration> {

private static final ArgumentProcessor<Configuration> argProcessor = new ArgumentProcessor<Configuration>();

static {
argProcessor.addOption("host", 'h', new StringFieldOption<Configuration>("host"));
argProcessor.addOption("username", 'u', new StringFieldOption<Configuration>("username"));
argProcessor.addOption("password", 'p', new StringFieldOption<Configuration>("password"));
argProcessor.setDefaultCommand(new Command<Configuration>() {
public void process(Queue<String> argq, Configuration state) {
state.getJobService();
}
});
}

/* (non-Javadoc)
* @see ca.eandb.util.args.AbstractCommand#process(java.util.Queue, java.lang.Object)
*/
public void process(Queue<String> argq, Configuration state) {
argProcessor.process(argq, state);
}

}
/*
* Copyright (c) 2008 Bradley W. Kimmel
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/

package ca.eandb.jdcp.client;

import java.util.Queue;

import ca.eandb.util.args.ArgumentProcessor;
import ca.eandb.util.args.Command;
import ca.eandb.util.args.StringFieldOption;

/**
* @author Brad
*
*/
public final class ConnectCommand implements Command<Configuration> {

private static final ArgumentProcessor<Configuration> argProcessor = new ArgumentProcessor<Configuration>();

static {
argProcessor.addOption("host", 'h', new StringFieldOption<Configuration>("host"));
argProcessor.addOption("username", 'u', new StringFieldOption<Configuration>("username"));
argProcessor.addOption("password", 'p', new StringFieldOption<Configuration>("password"));
argProcessor.setDefaultCommand(new Command<Configuration>() {
public void process(Queue<String> argq, Configuration state) {
state.getJobService();
}
});
}

/* (non-Javadoc)
* @see ca.eandb.util.args.AbstractCommand#process(java.util.Queue, java.lang.Object)
*/
public void process(Queue<String> argq, Configuration state) {
argProcessor.process(argq, state);
}

}
@@ -23,64 +23,64 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/

package ca.eandb.jdcp.client;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.Queue;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;

import ca.eandb.util.args.AbstractCommand;
import ca.eandb.util.args.ArgumentProcessor;
import ca.eandb.util.args.Command;
import ca.eandb.util.args.FileFieldOption;
import ca.eandb.util.args.StringFieldOption;

package ca.eandb.jdcp.client;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.Queue;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;

import ca.eandb.util.args.AbstractCommand;
import ca.eandb.util.args.ArgumentProcessor;
import ca.eandb.util.args.Command;
import ca.eandb.util.args.FileFieldOption;
import ca.eandb.util.args.StringFieldOption;

/**
* A <code>Command</code> that runs a specified script.
* @author Brad Kimmel
*/
* A <code>Command</code> that runs a specified script.
* @author Brad Kimmel
*/
public final class ScriptCommand implements Command<Configuration> {

private static final boolean SCRIPTING_SUPPORTED = Double.parseDouble(System.getProperty("java.specification.version")) >= 1.6;

private static final String SCRIPTING_NOT_SUPPORTED_MESSAGE = "Scripting requires Java SE 6 or higher.";

private static final String DEFAULT_LANGUAGE = "JavaScript";

private static final String DEFAULT_LANGUAGE = "JavaScript";

/**
* Command line options specific to the <code>ScriptCommand</code>.
* @author Brad Kimmel
*/
public static class Options {
*/
public static class Options {

/** The <code>File</code> from which to read the script. */
public File file;

/** The <code>File</code> from which to read the script. */
public File file;
/** The language in which the script was written. */
public String language = null;

/** The language in which the script was written. */
public String language = null;

}
}

/* (non-Javadoc)
* @see ca.eandb.util.args.Command#process(java.util.Queue, java.lang.Object)
*/
public void process(Queue<String> argq, final Configuration conf) {
public void process(Queue<String> argq, final Configuration conf) {
if (SCRIPTING_SUPPORTED) {

ArgumentProcessor<Options> argProcessor = new ArgumentProcessor<Options>();

argProcessor.addOption("file", 'f', new FileFieldOption<Options>("file", true));
argProcessor.addOption("language", 'l', new StringFieldOption<Options>("language"));
ArgumentProcessor<Options> argProcessor = new ArgumentProcessor<Options>();

argProcessor.addOption("file", 'f', new FileFieldOption<Options>("file", true));
argProcessor.addOption("language", 'l', new StringFieldOption<Options>("language"));

argProcessor.setDefaultCommand(new AbstractCommand<Options>() {
argProcessor.setDefaultCommand(new AbstractCommand<Options>() {
protected void run(String[] args, Options options) {
try {
ScriptEngineManager factory = new ScriptEngineManager();
@@ -102,9 +102,9 @@ protected void run(String[] args, Options options) {
} catch (IOException e) {
e.printStackTrace();
}
}
}
});


argProcessor.process(argq, new Options());

} else { // Java specification version < 1.6, scripting not supported
@@ -119,20 +119,20 @@ protected void run(String[] args, Options options) {
* @param options The command line options for this
* <code>ScriptCommand</code>.
* @return The <code>ScriptEngine</code> to use.
*/
*/
private ScriptEngine getScriptEngine(ScriptEngineManager factory, Options options) {
if (options.language != null) {
return factory.getEngineByName(options.language);
}
if (options.file != null) {
String fileName = options.file.getName();
int separator = fileName.lastIndexOf('.');
if (separator < 0) {
String extension = fileName.substring(separator + 1);
return factory.getEngineByExtension(extension);
}
}
return factory.getEngineByName(DEFAULT_LANGUAGE);
}

}
if (options.language != null) {
return factory.getEngineByName(options.language);
}
if (options.file != null) {
String fileName = options.file.getName();
int separator = fileName.lastIndexOf('.');
if (separator < 0) {
String extension = fileName.substring(separator + 1);
return factory.getEngineByExtension(extension);
}
}
return factory.getEngineByName(DEFAULT_LANGUAGE);
}

}

0 comments on commit a6555f6

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