com.bigdata.jini.start.config
Class JiniCoreServicesConfiguration.JiniCoreServicesStarter<V extends JiniCoreServicesProcessHelper>

java.lang.Object
  extended by com.bigdata.jini.start.config.ServiceConfiguration.AbstractServiceStarter<V>
      extended by com.bigdata.jini.start.config.JiniCoreServicesConfiguration.JiniCoreServicesStarter<V>
Type Parameters:
V -
All Implemented Interfaces:
Callable<V>
Enclosing class:
JiniCoreServicesConfiguration

public class JiniCoreServicesConfiguration.JiniCoreServicesStarter<V extends JiniCoreServicesProcessHelper>
extends ServiceConfiguration.AbstractServiceStarter<V>

Used to start the core jini services (reggie, etc).

Version:
$Id$
Author:
Bryan Thompson

Field Summary
 
Fields inherited from class com.bigdata.jini.start.config.ServiceConfiguration.AbstractServiceStarter
listener
 
Constructor Summary
protected JiniCoreServicesConfiguration.JiniCoreServicesStarter(IServiceListener listener, JiniClientConfig clientConfig)
           
 
Method Summary
protected  void addCommand(List<String> cmds)
          Figures out the executable depending on the platform if Options#CMD was not specified.
protected  void addCommandArgs(List<String> cmds)
          Adds command arguments immediately following the executable name.
protected  void awaitServiceStart(V processHelper, long timeout, TimeUnit unit)
          Overridden to monitor for the discovery of the service registrar on the localhost using the groups specified in the JiniClientConfig and of the LookupLocators specified in the JiniClientConfig which are locators for the local host.
protected  V newProcessHelper(String className, ProcessBuilder processBuilder, IServiceListener listener)
          Return the ProcessHelper that will be used to manage the process.
 
Methods inherited from class com.bigdata.jini.start.config.ServiceConfiguration.AbstractServiceStarter
addServiceOptions, call, getCommandLine, getServiceDir, newProcessBuilder, newProcessBuilder, setUp, setUpEnvironment, writeStartFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JiniCoreServicesConfiguration.JiniCoreServicesStarter

protected JiniCoreServicesConfiguration.JiniCoreServicesStarter(IServiceListener listener,
                                                                JiniClientConfig clientConfig)
Method Detail

newProcessHelper

protected V newProcessHelper(String className,
                             ProcessBuilder processBuilder,
                             IServiceListener listener)
                                                            throws IOException
Description copied from class: ServiceConfiguration.AbstractServiceStarter
Return the ProcessHelper that will be used to manage the process.

Overrides:
newProcessHelper in class ServiceConfiguration.AbstractServiceStarter<V extends JiniCoreServicesProcessHelper>
Returns:
Throws:
IOException

addCommand

protected void addCommand(List<String> cmds)
Figures out the executable depending on the platform if Options#CMD was not specified.

Specified by:
addCommand in class ServiceConfiguration.AbstractServiceStarter<V extends JiniCoreServicesProcessHelper>

addCommandArgs

protected void addCommandArgs(List<String> cmds)
Description copied from class: ServiceConfiguration.AbstractServiceStarter
Adds command arguments immediately following the executable name.

Overrides:
addCommandArgs in class ServiceConfiguration.AbstractServiceStarter<V extends JiniCoreServicesProcessHelper>

awaitServiceStart

protected void awaitServiceStart(V processHelper,
                                 long timeout,
                                 TimeUnit unit)
                          throws Exception,
                                 TimeoutException,
                                 InterruptedException
Overridden to monitor for the discovery of the service registrar on the localhost using the groups specified in the JiniClientConfig and of the LookupLocators specified in the JiniClientConfig which are locators for the local host.

Overrides:
awaitServiceStart in class ServiceConfiguration.AbstractServiceStarter<V extends JiniCoreServicesProcessHelper>
Throws:
TimeoutException - if a ServiceRegistrar could not be find within the timeout for the appropriate groups and locators.
Exception - If a service start failure could be detected (the caller will kill the process and log an error if any exception is thrown).
InterruptedException


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