public static SlimFactory createJavaSlimFactory(FixtureInteraction interaction, Integer timeout, boolean verbose) { return new JavaSlimFactory(interaction, timeout, verbose); }
public static FixtureInteraction createInteraction(String interactionClassName) { return createInteraction(interactionClassName, ClassLoader.getSystemClassLoader()); }
public static SlimFactory createJavaSlimFactory(SlimService.Options options) { return createJavaSlimFactory(options.interaction, options.statementTimeout, options.verbose); }
@Override public NameTranslator getMethodNameTranslator() { return getIdentityTranslator(); }
@Override public NameTranslator getMethodNameTranslator() { return getIdentityTranslator(); }
public static FixtureInteraction createInteraction(String interactionClassName) { return createInteraction(interactionClassName, ClassLoader.getSystemClassLoader()); }
public static SlimFactory createJavaSlimFactory(SlimService.Options options) { return createJavaSlimFactory(options.interaction, options.statementTimeout, options.verbose); }
public static SlimFactory createJavaSlimFactory(FixtureInteraction interaction, Integer timeout, boolean verbose) { return new JavaSlimFactory(interaction, timeout, verbose); }
public StatementExecutor() { this(new SlimExecutionContext(JavaSlimFactory.createInteraction(null))); }
protected SlimServer createSlimServer(FixtureInteraction interaction, Integer timeout, boolean verbose) { return JavaSlimFactory.createJavaSlimFactory(interaction, timeout, verbose).getSlimServer(); }
public StatementExecutor() { this(new SlimExecutionContext(JavaSlimFactory.createInteraction(null))); }
protected SlimServer createSlimServer(FixtureInteraction interaction, Integer timeout, boolean verbose) { return JavaSlimFactory.createJavaSlimFactory(interaction, timeout, verbose).getSlimServer(); }
public static Options parseCommandLine(String[] args) { CommandLine commandLine = new CommandLine(OPTION_DESCRIPTOR); if (commandLine.parse(args)) { boolean verbose = commandLine.hasOption("v"); String interactionClassName = commandLine.getOptionArgument("i", "interactionClass"); String portString = commandLine.getArgument("port"); int port = (portString == null) ? 1 : Integer.parseInt(portString); String statementTimeoutString = commandLine.getOptionArgument("s", "statementTimeout"); Integer statementTimeout = (statementTimeoutString == null) ? null : Integer.parseInt(statementTimeoutString); boolean daemon = commandLine.hasOption("d"); String sslParameterClassName = commandLine.getOptionArgument("ssl", "parameterClass"); boolean useSSL = commandLine.hasOption("ssl"); FixtureInteraction interaction = createInteraction(interactionClassName); return new Options(verbose, port, interaction, daemon, statementTimeout, useSSL, sslParameterClassName); } return null; }
public static void main(String[] args) throws IOException { Options options = parseCommandLine(args); if (options != null) { try { startWithFactory(createJavaSlimFactory(options), options); System.exit(0); } catch (Exception e) { e.printStackTrace(); System.err.println("Exiting as exception occured: " + e.getMessage()); System.exit(98); } } else { parseCommandLineFailed(args); System.exit(97); } }
public static Options parseCommandLine(String[] args) { CommandLine commandLine = new CommandLine(OPTION_DESCRIPTOR); if (commandLine.parse(args)) { boolean verbose = commandLine.hasOption("v"); String interactionClassName = commandLine.getOptionArgument("i", "interactionClass"); String portString = commandLine.getArgument("port"); int port = (portString == null) ? 1 : Integer.parseInt(portString); String statementTimeoutString = commandLine.getOptionArgument("s", "statementTimeout"); Integer statementTimeout = (statementTimeoutString == null) ? null : Integer.parseInt(statementTimeoutString); boolean daemon = commandLine.hasOption("d"); String sslParameterClassName = commandLine.getOptionArgument("ssl", "parameterClass"); boolean useSSL = commandLine.hasOption("ssl"); FixtureInteraction interaction = createInteraction(interactionClassName); return new Options(verbose, port, interaction, daemon, statementTimeout, useSSL, sslParameterClassName); } return null; }
public static void main(String[] args) throws IOException { Options options = parseCommandLine(args); if (options != null) { try { startWithFactory(createJavaSlimFactory(options), options); System.exit(0); } catch (Exception e) { e.printStackTrace(); System.err.println("Exiting as exception occured: " + e.getMessage()); System.exit(98); } } else { parseCommandLineFailed(args); System.exit(97); } }
@Override public SlimClient build() { final SlimService.Options options = SlimService.parseCommandLine(getSlimFlags()); Integer statementTimeout = options != null ? options.statementTimeout : null; FixtureInteraction interaction = options != null ? options.interaction : JavaSlimFactory.createInteraction(null, classLoader); SlimServer slimServer = createSlimServer(interaction, statementTimeout, isDebug()); return new InProcessSlimClient(getTestSystemName(), slimServer, getExecutionLogListener(), classLoader); }
@Override public SlimClient build() { final SlimService.Options options = SlimService.parseCommandLine(getSlimFlags()); Integer statementTimeout = options != null ? options.statementTimeout : null; FixtureInteraction interaction = options != null ? options.interaction : JavaSlimFactory.createInteraction(null, classLoader); SlimServer slimServer = createSlimServer(interaction, statementTimeout, isDebug()); return new InProcessSlimClient(getTestSystemName(), slimServer, getExecutionLogListener(), classLoader); }