com.bigdata.jini.start.config
Class JavaServiceConfiguration.JavaServiceStarter<V extends ProcessHelper>

java.lang.Object
  extended by com.bigdata.jini.start.config.ServiceConfiguration.AbstractServiceStarter<V>
      extended by com.bigdata.jini.start.config.JavaServiceConfiguration.JavaServiceStarter<V>
Type Parameters:
V -
All Implemented Interfaces:
Callable<V>
Direct Known Subclasses:
ManagedServiceConfiguration.ManagedServiceStarter, ZookeeperServerConfiguration.ZookeeperServiceStarter
Enclosing class:
JavaServiceConfiguration

public class JavaServiceConfiguration.JavaServiceStarter<V extends ProcessHelper>
extends ServiceConfiguration.AbstractServiceStarter<V>

Starts a java service.

Version:
$Id$
Author:
Bryan Thompson

Field Summary
 Class cls
          The class for the service that we are going to start.
 
Fields inherited from class com.bigdata.jini.start.config.ServiceConfiguration.AbstractServiceStarter
listener
 
Constructor Summary
protected JavaServiceConfiguration.JavaServiceStarter(IServiceListener listener)
           
 
Method Summary
protected  void addCommand(List<String> cmds)
          Adds the path of the java executable.
protected  void addCommandArgs(List<String> cmds)
          Extended to add JavaServiceConfiguration.Options.DEFAULT_JAVA_ARGS, JavaServiceConfiguration.Options.CLASSPATH, JavaServiceConfiguration.Options.LOG4J, and the ServiceConfiguration.className to the command line.
protected  void setUp()
          Extended to ensure that the ServiceConfiguration.serviceDir exists.
protected  void setUpEnvironment(Map<String,String> env)
          Puts the parent's CLASSPATH into the child's environment unless JavaServiceConfiguration.Options.CLASSPATH was specified.
 
Methods inherited from class com.bigdata.jini.start.config.ServiceConfiguration.AbstractServiceStarter
addServiceOptions, awaitServiceStart, call, getCommandLine, getServiceDir, newProcessBuilder, newProcessBuilder, newProcessHelper, writeStartFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cls

public final Class cls
The class for the service that we are going to start.

Constructor Detail

JavaServiceConfiguration.JavaServiceStarter

protected JavaServiceConfiguration.JavaServiceStarter(IServiceListener listener)
Parameters:
fed -
Method Detail

setUpEnvironment

protected void setUpEnvironment(Map<String,String> env)
Puts the parent's CLASSPATH into the child's environment unless JavaServiceConfiguration.Options.CLASSPATH was specified.

Overrides:
setUpEnvironment in class ServiceConfiguration.AbstractServiceStarter<V extends ProcessHelper>
Parameters:
env -
See Also:
ProcessBuilder.environment()

setUp

protected void setUp()
              throws Exception
Extended to ensure that the ServiceConfiguration.serviceDir exists.

Overrides:
setUp in class ServiceConfiguration.AbstractServiceStarter<V extends ProcessHelper>
Throws:
Exception

addCommand

protected void addCommand(List<String> cmds)
Adds the path of the java executable. This is based on the configured value of JavaServiceConfiguration.Options.JAVA_HOME.

Specified by:
addCommand in class ServiceConfiguration.AbstractServiceStarter<V extends ProcessHelper>
See Also:
JavaServiceConfiguration.Options.JAVA_HOME

addCommandArgs

protected void addCommandArgs(List<String> cmds)
Extended to add JavaServiceConfiguration.Options.DEFAULT_JAVA_ARGS, JavaServiceConfiguration.Options.CLASSPATH, JavaServiceConfiguration.Options.LOG4J, and the ServiceConfiguration.className to the command line.

Overrides:
addCommandArgs in class ServiceConfiguration.AbstractServiceStarter<V extends ProcessHelper>
Parameters:
cmds -


Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.