|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.root.RootObject
com.neeve.server.config.SrvConfigAppDescriptor
public final class SrvConfigAppDescriptor
A server application descriptor.
This class describes a server application and supplies methods to persist to and load descriptors from X Platform configuration respositories.
Method Summary | |
---|---|
static SrvConfigAppDescriptor |
create(String name)
Create a default app descriptor. |
static SrvConfigAppDescriptor |
create(UtlAddressDescriptor descriptor)
Create a server app descriptor from an address descriptor object |
void |
delete(IConfigRepository repo,
String serverName)
Delete a server app descriptor from a configuration repository. |
static boolean |
exists(IConfigRepository repo,
String serverName,
String name)
Check if an app is configured in a configuration repository. |
static boolean |
exists(String serverName,
String name)
Check if an app is configured in the default configuration repository. |
boolean |
getAutoStart()
Get whether an app's AEP engine should be auto-started by a server. |
String |
getMainClass()
Get the name of application's main class. |
String |
getName()
Get the name of the app that this descriptor describes. |
Properties |
getProperties()
Get the app properties |
String |
getProperty(String name)
Get an app property. |
static SrvConfigAppDescriptor |
load(IConfigRepository repo,
String serverName,
String name)
Create a server app descriptor from a configuration repository. |
static SrvConfigAppDescriptor |
load(String serverName,
String name)
Create a server app descriptor from the default configuration repository. |
static Set<SrvConfigAppDescriptor> |
loadAll(IConfigRepository repo,
String serverName)
Create descriptors for all server apps under a server in a configuration repository. |
static Set<SrvConfigAppDescriptor> |
loadAll(String serverName)
Create app descriptors for all apps configured for a server in the default configuration repository. |
void |
save(IConfigRepository repo,
String serverName)
Save a server app descriptor to a configuration repository. |
void |
save(String serverName)
Save a server app descriptor to the default configuration repository. |
SrvConfigAppDescriptor |
setAutoStart(boolean val)
Set whether an app's AEP engine should be auto started by a server. |
SrvConfigAppDescriptor |
setMainClass(String mainClass)
Set the name of application's main class. |
SrvConfigAppDescriptor |
setProperties(Properties props)
Set a set of app properties. |
SrvConfigAppDescriptor |
setProperty(String name,
String val)
Set an app property. |
String |
toString()
Returns a string representation of this object |
Methods inherited from class com.neeve.root.RootObject |
---|
getChecked, getThreaded, getTracer, setChecked, setTracer |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public final String getName()
public final SrvConfigAppDescriptor setMainClass(String mainClass)
mainClass
- The name of the main application class.
IllegalArgumentException
- Thrown in case the main class name
parameter is null.public final String getMainClass()
public final SrvConfigAppDescriptor setAutoStart(boolean val)
This method sets whether an app's AEP machinery should be auto-started by the server when the app is loaded. If set to true, the engine is auto-started after the application is loaded and initialized. Otherwise, the engine is created for the application but not started.
public final boolean getAutoStart()
The default value for this property is true i.e. unless otherwise configured, an app is automatically started by its hosting server when the app is loaded.
public final SrvConfigAppDescriptor setProperty(String name, String val)
public final String getProperty(String name)
public final SrvConfigAppDescriptor setProperties(Properties props)
public final Properties getProperties()
public final void save(IConfigRepository repo, String serverName) throws ESrvConfigException
repo
- The configuration respository to save the descriptor to.serverName
- The server in which to associated the app descriptor.
ESrvConfigException
- Thrown in case an error in encountered while
saving the descriptor.This method saves a server app descriptor to a configuration repository. The descriptor is saved in a format suitable for loading subsequently using any of the load methods offered by this class.
public final void save(String serverName) throws ESrvConfigException
serverName
- The server in which to associate the app descriptor.
ESrvConfigException
This method saves a server app descriptor to the default confiiguration respository. The descriptor is saved in a format suitable for loading subsequently using any of the load methods offered in this class.
public final void delete(IConfigRepository repo, String serverName) throws ESrvConfigException
repo
- The configuration respository to delete the descriptor from.
ESrvConfigException
- Thrown in case an error in encountered while
deleting the descriptor.This method permanently deletes an app descriptor from a configuration repository.
public final String toString()
toString
in class Object
public static SrvConfigAppDescriptor create(String name)
name
- The app name.public static SrvConfigAppDescriptor create(UtlAddressDescriptor descriptor)
descriptor
- The address descriptor using which to instantiate the
server app descriptor.
This method creates and initializes a server app descriptor from an
address descriptor of the following form:
public static boolean exists(IConfigRepository repo, String serverName, String name)
repo
- The configuration respository to check in.serverName
- The name of the server in which to check for app
existence.name
- The name of the app to check for.public static boolean exists(String serverName, String name)
serverName
- The name of the server in which to check for app
existence.name
- The name of the app to check for.public static SrvConfigAppDescriptor load(IConfigRepository repo, String serverName, String name) throws ESrvConfigException
repo
- The configuration respository to create it from.serverName
- The name of the server to which the app described
by this descriptor belongs.name
- The name of the app whose descriptor is to be prepared.
ESrvConfigException
This method creates and initializes a server app descriptor from the configuration repository identified by the specified configuration root.
public static SrvConfigAppDescriptor load(String serverName, String name) throws ESrvConfigException
serverName
- The name of the server to which the app belongs.name
- The name of the app whose descriptor is to be prepared.
ESrvConfigException
This method creates and initializes a server app descriptor from the default configuration repository.
public static Set<SrvConfigAppDescriptor> loadAll(IConfigRepository repo, String serverName) throws ESrvConfigException
repo
- The configuration respository from where to create the apps.serverName
- The server whose apps to create descriptors for.
This method creates and initializes app descriptors for each of the apps configured for a server in a configuration repository.
ESrvConfigException
public static Set<SrvConfigAppDescriptor> loadAll(String serverName) throws ESrvConfigException
This method creates and initializes app descriptors for all the apps configured for a server in the default configuration repository.
ESrvConfigException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |