|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.slamd.server.SLAMDServer
This class provides the entry point to the SLAMD server. It performs all the necessary bootstrapping, starts the scheduler, starts the client listener, and handles all necessary coordination between all other components of SLAMD.
| Field Summary | |
static java.lang.String |
CONFIG_SUBSCRIBER_NAME
The name used to register the logger as a subscriber to the configuration handler. |
static java.lang.String |
SLAMD_SERVER_VERSION
The version of the SLAMD server software being used. |
| Constructor Summary | |
SLAMDServer(AdminServlet adminServlet,
boolean readOnlyMode,
java.lang.String configDirectoryHost,
int configDirectoryPort,
java.lang.String configBindDN,
java.lang.String configBindPassword,
java.lang.String configBaseDN,
boolean configUseSSL,
boolean configDirBlindTrust,
java.lang.String sslKeyStore,
java.lang.String sslKeyPassword,
java.lang.String sslTrustStore,
java.lang.String sslTrustPassword)
Creates a new instance of the SLAMD server. |
|
SLAMDServer(AdminServlet adminServlet,
boolean readOnlyMode,
java.lang.String configDirectoryHost,
int configDirectoryPort,
java.lang.String configBindDN,
java.lang.String configBindPassword,
java.lang.String configBaseDN,
boolean configUseSSL,
boolean configDirBlindTrust,
java.lang.String sslKeyStore,
java.lang.String sslKeyPassword,
java.lang.String sslTrustStore,
java.lang.String sslTrustPassword,
int logLevel)
Creates a new instance of the SLAMD server. |
|
| Method Summary | |
void |
addJobClass(JobClass jobClass)
Adds the specified class as a job thread that can be used to run jobs in the SLAMD server. |
AdminServlet |
getAdminServlet()
Retrieves the admin servlet used to manage the SLAMD server. |
JobClass[][] |
getCategorizedJobClasses()
Retrieves the set of job classes defined for use in the configuration directory, separated into the individual job class categories. |
java.lang.String |
getClassPath()
Retrieves the location of the job class files on the local filesystem. |
ClientListener |
getClientListener()
Retrieves the client listener associated with this SLAMD server. |
ClientManagerListener |
getClientManagerListener()
Retrieves the client manager listener associated with this SLAMD server. |
ConfigHandler |
getConfigHandler()
Retrieves the configuration handler associated with this SLAMD server. |
JobCache |
getJobCache()
Retreives the job cache associated with this SLAMD server. |
JobClass |
getJobClass(java.lang.String className)
Retrieves the SLAMD job class with the specified name. |
java.lang.String[] |
getJobClassCategories()
Retrieves the names of the job class categories defined to the SLAMD server. |
JobClass[] |
getJobClasses()
Retrieves the set of job classes defined for use in the configuration directory. |
JobClass[] |
getJobClasses(java.lang.String categoryName)
Retrieves the set of job classes defined for use in the configuration directory that are in the specified category name. |
SMTPMailer |
getMailer()
Retrieves the mailer associated with this SLAMD server. |
ResourceMonitorClientListener |
getMonitorClientListener()
Retrieves the resource monitor client listener associated with this SLAMD server. |
OptimizationAlgorithm |
getOptimizationAlgorithm(java.lang.String algorithmClass)
Retrieves the optimization algorithm with the specified class name. |
OptimizationAlgorithm[] |
getOptimizationAlgorithms()
Retrieves the set of optimization algorithms defined for use in the SLAMD server. |
JobClass |
getOrLoadJobClass(java.lang.String className)
Retrieves a cached copy of this job class if possible. |
Scheduler |
getScheduler()
Retrieves the scheduler associated with this SLAMD server. |
java.lang.String |
getSSLKeyStore()
Retrieves the location of the SSL key store. |
java.lang.String |
getSSLKeyStorePassword()
Retrieves the password required to access the SSL key store. |
java.lang.String |
getSSLTrustStore()
Retrieves the location of the SSL trust store. |
java.lang.String |
getSSLTrustStorePassword()
Retrieves the password required to access the SSL trust store. |
java.util.Date |
getStartupTime()
Retrieves the time that the SLAMD server was started. |
RealTimeStatHandler |
getStatHandler()
Retrieves the real-time stat handler associated with this SLAMD server. |
StatListener |
getStatListener()
Retrieves the stat listener associated with this SLAMD server. |
java.lang.String |
getSubscriberName()
Retrieves the name that the server uses to subscribe to the configuration handler in order to be notified of configuration changes. |
ParameterList |
getSubscriberParameters()
Retrieves the set of configuration parameters associated with this configuration subscriber. |
java.lang.String |
getTimestamp()
Retrieves a formatted timestamp containing the current time. |
JobClass |
loadJobClass(java.lang.String className)
Loads the job class with the specified name and returns it to the caller. |
boolean |
loggerInitialized()
Indicates whether the logging subsystem has been initialized. |
void |
logMessage(int messageLogLevel,
java.lang.String logMessage)
Writes the specified message to the SLAMD log if appropriate (based on the log level). |
void |
logWithoutFormatting(int messageLogLevel,
java.lang.String message)
Writes the specified message to the SLAMD log if appropriate (based on the log level). |
void |
refreshSubscriberConfiguration()
Re-reads all configuration information used by the core SLAMD server. |
void |
refreshSubscriberConfiguration(java.lang.String parameterName)
Re-reads the configuration information for the specified parameter. |
void |
reloadJobClasses()
Refreshes the list of available job classes from the definitions stored in the configuration directory. |
void |
removeJobClass(JobClass jobClass)
Removes the specified class from the list of job classes defined in the SLAMD server. |
void |
sendCompletedJobNotification(Job job)
Checks to see if an e-mail message should be sent to one or more users to tell them that the specified job is complete. |
void |
setLoggerInitialized(boolean loggerInitialized)
Specifies whether the logger is initialized or not. |
void |
stopSLAMD()
Stops the SLAMD server and all related components. |
boolean |
useCustomClassLoader()
Indicates whether a custom class loader should be used for loading job classes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String SLAMD_SERVER_VERSION
public static final java.lang.String CONFIG_SUBSCRIBER_NAME
| Constructor Detail |
public SLAMDServer(AdminServlet adminServlet,
boolean readOnlyMode,
java.lang.String configDirectoryHost,
int configDirectoryPort,
java.lang.String configBindDN,
java.lang.String configBindPassword,
java.lang.String configBaseDN,
boolean configUseSSL,
boolean configDirBlindTrust,
java.lang.String sslKeyStore,
java.lang.String sslKeyPassword,
java.lang.String sslTrustStore,
java.lang.String sslTrustPassword)
throws SLAMDServerException
adminServlet - The admin servlet used to control the SLAMD
server.readOnlyMode - Indicates whether the server should operate in
read-only mode. If so, then it should not
create any listeners.configDirectoryHost - The DNS hostname or IP address of the
configuration directory server. There can
be multiple hosts provided (separated by
spaces) to provide failover capability.configDirectoryPort - The port number to use to bind to the
configuration directory server.configBindDN - The DN to use when binding to the
configuration directory server.configBindPassword - The password to use for the bind DN.configBaseDN - The location in the configuration directory
under which SLAMD information will be stored.configUseSSL - Indicates whether communication between the
SLAMD server and the configuration directory
should use SSL.configDirBlindTrust - Indicates whether the SLAMD server should
blindly trust any SSL certificate presented
by the configuration directory.sslKeyStore - The JSSE key store file to use for SSL
connections (typically "~/.keystore").sslKeyPassword - The password that should be used to access
the contents of the JSSE key store.sslTrustStore - The JSSE trust store file to use for SSL
connections (typically
"JAVA_HOME/jre/lib/security/cacerts")sslTrustPassword - The password that should be used to access
the contents of the JSSE trust store.
SLAMDServerException - If an unrecoverable error occurs that
prevents the server from operating.
public SLAMDServer(AdminServlet adminServlet,
boolean readOnlyMode,
java.lang.String configDirectoryHost,
int configDirectoryPort,
java.lang.String configBindDN,
java.lang.String configBindPassword,
java.lang.String configBaseDN,
boolean configUseSSL,
boolean configDirBlindTrust,
java.lang.String sslKeyStore,
java.lang.String sslKeyPassword,
java.lang.String sslTrustStore,
java.lang.String sslTrustPassword,
int logLevel)
throws SLAMDServerException
adminServlet - The admin servlet used to control the SLAMD
server.readOnlyMode - Indicates whether the server should operate in
read-only mode. If so, then it should not
create any listeners.configDirectoryHost - The DNS hostname or IP address of the
configuration directory server. There can
be multiple hosts provided (separated by
spaces) to provide failover capability.configDirectoryPort - The port number to use to bind to the
configuration directory server.configBindDN - The DN to use when binding to the
configuration directory server.configBindPassword - The password to use for the bind DN.configBaseDN - The location in the configuration directory
under which SLAMD information will be stored.configUseSSL - Indicates whether communication between the
SLAMD server and the configuration directory
should use SSL.configDirBlindTrust - Indicates whether the SLAMD server should
blindly trust any SSL certificate presented
by the configuration directory.sslKeyStore - The JSSE key store file to use for SSL
connections (typically "~/.keystore").sslKeyPassword - The password to access the JSSE key store.sslTrustStore - The JSSE trust store file to use for SSL
connections (typically
"JAVA_HOME/jre/lib/security/cacerts")sslTrustPassword - The password to access the JSSE trust store.logLevel - The loglevel that should be used by the
server. If it is a valid loglevel, then it
will override whatever loglevel may be
specified in the configuration.
SLAMDServerException - If an unrecoverable error occurs that
prevents the server from operating.| Method Detail |
public void stopSLAMD()
public AdminServlet getAdminServlet()
public java.lang.String getClassPath()
public JobClass[] getJobClasses()
public JobClass[] getJobClasses(java.lang.String categoryName)
categoryName - The name of the category for which to retrieve the
job classes.
public java.lang.String[] getJobClassCategories()
public JobClass[][] getCategorizedJobClasses()
public JobClass getJobClass(java.lang.String className)
className - The Java class name for the class to retrieve.
null
if the specified job class is not known to the SLAMD server.public boolean useCustomClassLoader()
true if a custom class loader should be used for
loading job classes, or false if not.
public JobClass loadJobClass(java.lang.String className)
throws SLAMDException
className - The name of the job class to be loaded.
SLAMDException - If a problem occurs while trying to load the
requested class.
public JobClass getOrLoadJobClass(java.lang.String className)
throws SLAMDException
className - The name of the Java class to be returned.
SLAMDException - If it is necessary to load the job class and a
problem occurs while doing so.
public void reloadJobClasses()
throws SLAMDServerException
SLAMDServerException - If a problem is encountered while reading
from the configuration directory.
public void addJobClass(JobClass jobClass)
throws SLAMDServerException
jobClass - The job thread class that will be used to perform the
work for this job.
SLAMDServerException - If a problem is encountered while adding the
job class.
public void removeJobClass(JobClass jobClass)
throws SLAMDServerException
jobClass - The class to remove from the set of defined job classes.
SLAMDServerException - If a problem is encountered while removing
the job class.public OptimizationAlgorithm[] getOptimizationAlgorithms()
public OptimizationAlgorithm getOptimizationAlgorithm(java.lang.String algorithmClass)
algorithmClass - The fully-qualified name of the Java class that
provides the optimization algorithm.
null if no such algorithm is defined.public java.util.Date getStartupTime()
public void logMessage(int messageLogLevel,
java.lang.String logMessage)
messageLogLevel - The log level to use when determining whether to
actually write the message to the SLAMD log.logMessage - The message to be logged.
public void logWithoutFormatting(int messageLogLevel,
java.lang.String message)
messageLogLevel - The log level to use when determining whether to
actually write the message to the SLAMD log.message - The message to be logged.public java.lang.String getTimestamp()
public ConfigHandler getConfigHandler()
public JobCache getJobCache()
public ClientListener getClientListener()
public ClientManagerListener getClientManagerListener()
public ResourceMonitorClientListener getMonitorClientListener()
public StatListener getStatListener()
public RealTimeStatHandler getStatHandler()
public SMTPMailer getMailer()
public void sendCompletedJobNotification(Job job)
job - The job for which to provide notification.public boolean loggerInitialized()
true if the logging system has been initialized, or
false if not.public void setLoggerInitialized(boolean loggerInitialized)
loggerInitialized - Used to indicate whether the logger has been
initialized or not.public Scheduler getScheduler()
public java.lang.String getSSLKeyStore()
public java.lang.String getSSLKeyStorePassword()
public java.lang.String getSSLTrustStore()
public java.lang.String getSSLTrustStorePassword()
public java.lang.String getSubscriberName()
getSubscriberName in interface ConfigSubscriberpublic ParameterList getSubscriberParameters()
getSubscriberParameters in interface ConfigSubscriberpublic void refreshSubscriberConfiguration()
refreshSubscriberConfiguration in interface ConfigSubscriberpublic void refreshSubscriberConfiguration(java.lang.String parameterName)
refreshSubscriberConfiguration in interface ConfigSubscriberparameterName - The name of the parameter to be re-read from the
configuration.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||