org.aludratest.service.cmdline.impl
Class CommandLineServiceImpl

java.lang.Object
  extended by org.aludratest.service.AbstractAludraService
      extended by org.aludratest.service.AbstractConfigurableAludraService
          extended by org.aludratest.service.cmdline.impl.CommandLineServiceImpl
All Implemented Interfaces:
Closeable, Configurable, AludraCloseable, AludraService, CommandLineService

public class CommandLineServiceImpl
extends AbstractConfigurableAludraService
implements CommandLineService

Default implementation of the CommandLineService. It uses a single CommandLineActionImpl instance.

Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.aludratest.service.AbstractAludraService
aludraServiceContext
 
Constructor Summary
CommandLineServiceImpl()
           
 
Method Summary
 CommandLineCondition check()
          Exhibits the service's Condition implementor
 void close()
          Closes the service
 void configure(Preferences preferences)
          Called by the framework to let a configurable object configure itself according to the passed Preferences object.
 String getBaseDirectory()
           
 String getDescription()
          Provides a textual description of the most important configuration information to be logged when the service is configured.
 String getPropertiesBaseName()
          Returns the base name for properties files for this configurable, e.g.
 void initService()
          Abstract initialization method to be implemented by child classes for individual initialization operations.
 CommandLineInteraction perform()
          Exhibits the service's Interaction implementor
 CommandLineVerification verify()
          Exhibits the service's Verification implementor
 
Methods inherited from class org.aludratest.service.AbstractConfigurableAludraService
fillDefaults, getDefaultsResourceName
 
Methods inherited from class org.aludratest.service.AbstractAludraService
getInstanceName, init, setSystemConnector, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.aludratest.service.AludraService
getInstanceName, init, setSystemConnector
 

Constructor Detail

CommandLineServiceImpl

public CommandLineServiceImpl()
Method Detail

getDescription

public String getDescription()
Description copied from interface: AludraService
Provides a textual description of the most important configuration information to be logged when the service is configured.

Specified by:
getDescription in interface AludraService
Returns:
a textual description of the most important configuration information

getPropertiesBaseName

public String getPropertiesBaseName()
Description copied from interface: Configurable
Returns the base name for properties files for this configurable, e.g. "aludratest" if the properties files are named "aludratest.properties", or "fileService" for "fileService.properties".

Specified by:
getPropertiesBaseName in interface Configurable
Returns:
The base name for properties files for this configurable, never null.

configure

public void configure(Preferences preferences)
               throws AutomationException
Description copied from interface: Configurable
Called by the framework to let a configurable object configure itself according to the passed Preferences object. The object is allowed to store the passed Preferences reference and query it for configuration parameters when needed. It is also OK to extract all required parameters in this method.
In any case, this method should check the configuration for validness and throw an AutomationException when the configuration is invalid.

Specified by:
configure in interface Configurable
Parameters:
preferences - Configuration object for this configurable.
Throws:
AutomationException - If the configuration contains invalid elements.

initService

public void initService()
Description copied from class: AbstractAludraService
Abstract initialization method to be implemented by child classes for individual initialization operations. Implementors can access the protected aludraServiceContext field to retrieve instances of other services, if required.

Specified by:
initService in class AbstractAludraService

close

public void close()
Closes the service

Specified by:
close in interface Closeable
Specified by:
close in interface AludraCloseable

perform

public CommandLineInteraction perform()
Description copied from interface: CommandLineService
Exhibits the service's Interaction implementor

Specified by:
perform in interface AludraService
Specified by:
perform in interface CommandLineService
Returns:
the service's Interaction object

verify

public CommandLineVerification verify()
Description copied from interface: CommandLineService
Exhibits the service's Verification implementor

Specified by:
verify in interface AludraService
Specified by:
verify in interface CommandLineService
Returns:
the service's Verification object

check

public CommandLineCondition check()
Description copied from interface: CommandLineService
Exhibits the service's Condition implementor

Specified by:
check in interface AludraService
Specified by:
check in interface CommandLineService
Returns:
the service's Condition object

getBaseDirectory

public String getBaseDirectory()
Specified by:
getBaseDirectory in interface CommandLineService
Returns:
the configured base.directory


Copyright © 2015 aludratest.org. All rights reserved.