SRJRCFrames
v0.1.296

de.schwarzrot.app
Interface MainEntry<C extends AbstractSysConfig>

Type Parameters:
C - - applications configuration entity
All Superinterfaces:
Runnable
All Known Subinterfaces:
Service<C>
All Known Implementing Classes:
AbstractService, AppMain, SampleService, ServiceManager

public interface MainEntry<C extends AbstractSysConfig>
extends Runnable

provide a basic interface for dynamically loadable applications and services, loadable by ApplicationLauncher.

Author:
Reinhard Mantey

Method Summary
 Map<String,String> getAppArgs()
          provide access to the expanded arguments of main(String[] args)
 String getAppInfo()
          print initial startup information
 SystemDefault getApplicationDefaults()
          access the application defaults.
 String getApplicationName()
          print the application name - may be localized.
 C getConfig()
          access application starters configuration instance
 void setAppArgs(Map<String,String> appArgs)
          set expanded arguments of main(String[] args)
 void setConfig(C config)
          set application starters configuration instance
 void usage()
          tell the user about the right usage
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

getAppArgs

Map<String,String> getAppArgs()
provide access to the expanded arguments of main(String[] args)

Returns:
- given arguments (if any)

getAppInfo

String getAppInfo()
print initial startup information

Returns:
- the message to print at application start

getApplicationDefaults

SystemDefault getApplicationDefaults()
access the application defaults. As the framework provides parts of application contexts, its essential to be able to change the settings of the placeholderConfigurer. So the SystemDefaults can't be coded as static class. This call will return an instance, that is provided by the framework, but can be overwritten by user applications.

Returns:
an instance that provides the system defaults

getApplicationName

String getApplicationName()
print the application name - may be localized. For identifying purpose consider using SystemDefault.applicationID

Returns:
- the applications name

getConfig

C getConfig()
access application starters configuration instance

Returns:
the configuration instance

setAppArgs

void setAppArgs(Map<String,String> appArgs)
set expanded arguments of main(String[] args)

Parameters:
appArgs - arguments from main expanded to key/value pairs

setConfig

void setConfig(C config)
set application starters configuration instance

Parameters:
config - the configuration instance

usage

void usage()
tell the user about the right usage


SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.