public class Framework
extends java.lang.Object
Constructor and Description |
---|
Framework() |
Framework(boolean noGUI)
Constructor.
|
Framework(boolean noGUI,
boolean starterGUI)
Constructor.
|
Framework(FrameworkOwner owner)
Create the framework with an owner module.
|
Framework(short guiState,
boolean starterGUI)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
attachServiceProvider(NamespaceKey serviceKey,
Module module)
Attach a module as a Service Provider for a particular Service.
|
boolean |
attachServiceProvider(NamespaceKey serviceKey,
ModuleIDKey moduleKey)
Attach a module as a Service Provider for a particular Service.
|
Application |
getApplication(long appliID)
Return an application by its associated long ID.
|
Application |
getApplication(java.lang.String name)
Return the Application of a specificed name.
|
java.util.Set<java.lang.String> |
getApplicationName()
Return the application names.
|
java.util.SortedMap<java.lang.String,Application> |
getApplications()
Return the applications.
|
java.util.Map<java.lang.Long,Application> |
getApplicationsByID()
Return the Applications.
|
java.lang.ClassLoader |
getClassLoader(boolean isEmbedded)
Return the framework ClassLoader.
|
java.util.List<java.net.URL> |
getConfigurationDirectories()
Return the configuration directories.
|
FrameworkDefinition |
getDefinition()
Return the Framework definition.
|
javax.swing.JFrame |
getGUIComponent()
Return the GUI component of the framework (if there is a GUI).
|
Module |
getModule(ModuleIDKey key)
Return a Module of a specified Module ID key.
|
Module |
getModule(ModuleKey key)
Return a Module of a specified Module key.
|
FrameworkOwner |
getOwner()
Return the FrameworkOwner or null if there is no owner.
|
Service<?> |
getService(NamespaceKey key)
Return the Service of a specified key.
|
Service<?> |
getService(java.lang.String name)
Return the Service of a specified name.
|
java.util.Map<NamespaceKey,Service<?>> |
getServices()
Return the Services.
|
java.util.Map<java.lang.String,Service<?>> |
getServicesByName()
Return the Services.
|
long |
getStartTimeStamp()
Return the time stamp at the start of the framework.
|
Type |
getType(NamespaceKey key)
Return the type of a specified key.
|
Type |
getType(java.lang.String name)
Return the type of a specified name.
|
static void |
hideStartLog()
Calling this method will hide the start Log.
|
static boolean |
isUnixPlatform()
Return true on Unix platforms.
|
static void |
main(java.lang.String[] args)
The main method of the class.
|
static void |
preventExit()
Calling this method will prevent further
System.exit() calles to be made when exiting the application. |
void |
setApplicationNames(java.util.Set<java.lang.String> applicationNames)
Set the application names.
|
void |
setLogger(org.da.protoframework.conf.FrameworkLogger logger)
Set the logger.
|
void |
setParserLogger(org.da.protoframework.parser.ParserLogger logger)
Set the parser logger.
|
void |
setup(java.net.URL config)
Setup the framework.
|
void |
setup(java.net.URL[] configs)
Setup the framework.
|
void |
shutdown()
Shutdown the framework.
|
void |
start()
Start the framework.
|
public Framework()
public Framework(FrameworkOwner owner)
owner
- the owner modulepublic Framework(boolean noGUI)
noGUI
- true if there should be no GUI for the Framework logpublic Framework(short guiState, boolean starterGUI)
guiState
- the GUI statestarterGUI
- true if there is a starter GUI to set the values for properties, if there are configuration propertiespublic Framework(boolean noGUI, boolean starterGUI)
noGUI
- true if there should be no GUI for the Framework logstarterGUI
- true if there is a starter GUI to set the values for properties, if there are configuration propertiespublic static final boolean isUnixPlatform()
public static void preventExit()
System.exit()
calles to be made when exiting the application. This is normally
only useful in Unit tests.public static void hideStartLog()
public javax.swing.JFrame getGUIComponent()
public FrameworkDefinition getDefinition()
public java.lang.ClassLoader getClassLoader(boolean isEmbedded)
isEmbedded
- true if the configuration is embedded as an entry in a zip or jar filepublic java.util.List<java.net.URL> getConfigurationDirectories()
public void setApplicationNames(java.util.Set<java.lang.String> applicationNames)
applicationNames
- the application namespublic java.util.Set<java.lang.String> getApplicationName()
public void setLogger(org.da.protoframework.conf.FrameworkLogger logger)
logger
- the loggerpublic void setParserLogger(org.da.protoframework.parser.ParserLogger logger)
logger
- the parser loggerpublic java.util.SortedMap<java.lang.String,Application> getApplications()
public Module getModule(ModuleIDKey key)
key
- the Module ID keypublic Module getModule(ModuleKey key)
key
- the Module keypublic Application getApplication(java.lang.String name)
name
- the Application namepublic java.util.Map<java.lang.String,Service<?>> getServicesByName()
public java.util.Map<NamespaceKey,Service<?>> getServices()
public Application getApplication(long appliID)
appliID
- the application long IDpublic java.util.Map<java.lang.Long,Application> getApplicationsByID()
public Type getType(NamespaceKey key)
key
- the type keypublic Type getType(java.lang.String name)
name
- the type namepublic Service<?> getService(NamespaceKey key)
key
- the Service keypublic Service<?> getService(java.lang.String name)
name
- the Service namepublic boolean attachServiceProvider(NamespaceKey serviceKey, Module module)
serviceKey
- the service keymodule
- the Modulepublic boolean attachServiceProvider(NamespaceKey serviceKey, ModuleIDKey moduleKey)
serviceKey
- the Service keymoduleKey
- the ModuleID Keypublic FrameworkOwner getOwner()
public void setup(java.net.URL config) throws FrameworkException
config
- the configurationFrameworkException
public void setup(java.net.URL[] configs) throws FrameworkException
configs
- the configuration files arrayFrameworkException
public long getStartTimeStamp()
public void start()
public void shutdown()
public static void main(java.lang.String[] args)
ConfigurationParser
args
- the argumentsCopyright ©2017-2023 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence