Methods Summary |
---|
public void | createService(java.util.Map params)Creates an arbitrary service, specified by certain parameters. The implementations
should dictate the mappings in the parameters received. The creation of service is
either successful or not. In other words, the implementations must retain the original
state of the operating platform if the service creation is not successful completely.
|
public java.lang.String | getAsadminPath()Returns the absolute path to the asadmin script.
|
public java.lang.String | getDate()Returns the date the service is created.
|
public java.lang.String | getFQSN()Returns the so-called Fully Qualified Service Name for this service.
It is a function of name and location where the configuration of the
service is stored. Might not return the intended value if the name and/or
location is not set prior to this call.
|
public java.lang.String | getLocation()Returns the location where configuration of the service is stored
on the disk.
|
public java.lang.String | getManifestFilePath()Returns the absolute location of the manifest file as service understands it.
It takes into account the name, type and configuration location of the
service. It is expected that these are set before calling this method.
If the Fully Qualified Service Name is invalid, a RuntimeException results.
|
public java.lang.String | getManifestFileTemplatePath()Returns the absolute location of the template for the given service.
The type of the service must be set before calling this method, otherwise
a runtime exception results.
|
public java.lang.String | getName()Returns the name of the Service.
|
public java.lang.String | getOSUser()Returns the OS-level user-id who should start and own the processes started
by this service.
|
public java.lang.String | getPasswordFilePath()Returns the absolute path of the password file that contains asadmin
authentication artifacts.
|
public java.lang.String | getServiceProperties()Returns the additional properties of the Service.
|
public int | getTimeoutSeconds()Returns timeout in seconds before the master boot restarter should
give up starting this service.
|
public AppserverServiceType | getType()Returns the type of service as an enum AppserverServiceType, from the given String.
|
public boolean | isConfigValid()Determines if the configuration of the method is valid. When this class
is constructed, appropriate defaults are used. But before attempting to create
the service in the Solaris platform, it is important that the necessary
configuration is done by the users via various mutator methods of this class.
This method must be called to guard against some abnormal failures before
creating the service. It makes sure that the caller has set all the necessary
parameters reasonably. Note that it does not validate the actual values.
|
public void | setAsadminPath(java.lang.String path)Sets the absolute path to the asadmin script. May not be null.
|
public void | setDate(java.lang.String date)Sets the date as the date when this service is created.
|
public void | setFQSN()Sets the so-called Fully Qualified Service Name for this service.
Note that there is no parameter accepted by this method. This is because the
Fully Qualified Service Name is a function of name and location. The
callers are expected to call this method once name and location is set on
this service.
|
public void | setLocation(java.lang.String cfgLocation)Sets the location to the parent of given location.
The location is treated as absolute and hence caller
must ensure that it passes the absolute location.
|
public void | setName(java.lang.String name)Sets the name of the service. Parameter may not be null,
an IllegalArgumentException results otherwise.
|
public void | setOSUser()Sets the OS-level user-id who should start and own the processes started
by this service. This user is the same as the value returned by
System.getProperty("user.name"). The idea is that the method is
called by the user who actually wants to own the service.
|
public void | setPasswordFilePath(java.lang.String path)Sets the absolute path of the password file that contains asadmin
authentication artifacts. Parameter may not be null.
|
public void | setServiceProperties(java.lang.String cds)Sets the additional service properties that are specific to it.
|
public void | setTimeoutSeconds(int number)Sets timeout in seconds before the master boot restarter should
give up starting this service.
|
public void | setTrace(boolean trace)Sets the trace flag. The ServiceHandler is expected to provide trace output if the flag is set.
|
public void | setType(AppserverServiceType type)Sets the type of the service to the given value in the enum.
|
public java.util.Map | tokensAndValues()Returns the tokens and values of the service as a map.
This method converts a service into corresponding tokens and their values.
|