org.neovera.jdiablo
Interface Environment

All Known Implementing Classes:
AbstractEnvironment, Help, SpringEnvironment

public interface Environment

An environment starts and stops frameworks and other aspects required for the process to function. An example of an environment is the Spring IoC system. The SpringEnvironment.java class sets up and tears down the Spring context when the process starts and stops.


Method Summary
 void initialize(Environment environment, List<? extends OptionProperty> properties)
          This method is called after the start() of this environment.
 void initialize(Object target, List<? extends OptionProperty> properties)
          Called after the start() of this environment.
 boolean start()
          Start the environment.
 void stop()
          Stop the environment.
 

Method Detail

start

boolean start()
Start the environment. Any exception thrown will cause target execution to abort and stop to be called.

Returns:
true to continue to next environment, false to stop all environments and abort launch.

stop

void stop()
Stop the environment.


initialize

void initialize(Environment environment,
                List<? extends OptionProperty> properties)
This method is called after the start() of this environment. It is called for each environment that is registered - those that have already been initialized and those that are yet to be initialized. In a chained execution, this is called again when each environment is restarted and new ones are started.

Parameters:
environment - Launch environment instance.
properties - Annotated properties for this environment. NOTE: A property that is annotated will not appear in this list if the option was defined during specialization. The isValueInCommandLine() will return true if the value was specified (and set) via command line.

initialize

void initialize(Object target,
                List<? extends OptionProperty> properties)
Called after the start() of this environment.

Parameters:
target - The target of the launch.
properties - Annotated properties for the launch target.


Copyright © 2014 Neovera Inc.. All rights reserved.