public final class Management extends java.lang.Object implements ManagementMBean, javax.management.MBeanRegistration
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAllSystemEnvProperties() |
java.lang.String |
getAllSystemProperties() |
java.lang.String |
getConfigurationFile()
Get the xml based configuration file
|
java.util.logging.Level |
getConsoleLogLevel()
Get the current loglevel for the console
|
java.util.logging.Level |
getFileLogLevel()
get the loglevel on the agent logfile
|
java.lang.String |
getFileLogPath()
Get the file logpath
|
static Management |
getInstance()
Static factory method to get an instance of management.
|
static Management |
getInstance(java.util.Properties ogaProperties)
Static factory method to get an instance of Management.
|
java.lang.Integer |
getNumberOfThreads()
Get number of Threads to use for indexing
|
java.lang.String |
getProperty(java.lang.String key)
Get a selected property from configuration.
|
java.lang.String |
getPublishServerURL()
Get the URL to the Publish Server we want to
publish the indexed data
|
java.util.Date |
getStartDate()
Get a Date object with the time the agent was started.
|
long |
getStartTime()
Get the time (in milliseconds since 1970) when the agent was started
|
java.lang.String[] |
getSubFiles()
Get subfiles
|
java.lang.String |
getSystemEnvProperty(java.lang.String key)
Get the selected Environment property
|
java.lang.String |
getSystemProperty(java.lang.String key)
Get the selected System property
|
java.lang.Boolean |
getUpdateIndexDatabase()
Get the udate database property
|
java.lang.String |
getVersion()
Get the version tag for the agent
|
void |
postDeregister() |
void |
postRegister(java.lang.Boolean registrationDone) |
void |
preDeregister() |
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name) |
void |
setConfigurationFile(java.lang.String filename)
Set a new name for the xml based configurationfile
|
void |
setConsoleLogLevel(java.util.logging.Level level)
Set the loglevel for the console
|
void |
setFileLogLevel(java.util.logging.Level level)
set the file log level
|
void |
setFileLogPath(java.lang.String path)
Set the path for the file logging
|
void |
setNumberOfThreads(java.lang.Integer val)
Set number of Threads to use for indexing
|
void |
setProperty(java.lang.String key,
java.lang.String value)
Set a selected property in the configuration.
|
void |
setPublishServerURL(java.lang.String url)
Set the URL to where to publish opengrok indexed data
|
void |
setSubFiles(java.lang.String[] sublist)
Set subfiles
|
void |
setSystemProperty(java.lang.String key,
java.lang.String value)
Set a selected System property
|
void |
setUpdateIndexDatabase(java.lang.Boolean val)
Set update index database property
|
void |
stop()
Stops the agent, so it is not restarted.
|
public static Management getInstance(java.util.Properties ogaProperties)
ogaProperties
- The properties to usepublic static Management getInstance()
public java.lang.String getProperty(java.lang.String key)
getProperty
in interface ManagementMBean
public void setProperty(java.lang.String key, java.lang.String value)
setProperty
in interface ManagementMBean
key
- the String key for the property to be set.
$param value the String value for the property to be set.public javax.management.ObjectName preRegister(javax.management.MBeanServer server, javax.management.ObjectName name)
preRegister
in interface javax.management.MBeanRegistration
public void postRegister(java.lang.Boolean registrationDone)
postRegister
in interface javax.management.MBeanRegistration
public void preDeregister()
preDeregister
in interface javax.management.MBeanRegistration
public void postDeregister()
postDeregister
in interface javax.management.MBeanRegistration
public void stop()
stop
in interface ManagementMBean
public java.lang.String getSystemProperty(java.lang.String key)
ManagementMBean
getSystemProperty
in interface ManagementMBean
public void setSystemProperty(java.lang.String key, java.lang.String value)
ManagementMBean
setSystemProperty
in interface ManagementMBean
key
- the String key for the property to be set.
$param value the String value for the property to be set.public java.lang.String getAllSystemProperties()
public java.lang.String getSystemEnvProperty(java.lang.String key)
ManagementMBean
getSystemEnvProperty
in interface ManagementMBean
public java.lang.String getAllSystemEnvProperties()
public long getStartTime()
getStartTime
in interface ManagementMBean
public java.util.Date getStartDate()
getStartDate
in interface ManagementMBean
public java.lang.String getVersion()
getVersion
in interface ManagementMBean
public void setUpdateIndexDatabase(java.lang.Boolean val)
ManagementMBean
setUpdateIndexDatabase
in interface ManagementMBean
val
- Boolean true to also run update index databasepublic java.lang.Boolean getUpdateIndexDatabase()
ManagementMBean
getUpdateIndexDatabase
in interface ManagementMBean
public void setNumberOfThreads(java.lang.Integer val)
ManagementMBean
setNumberOfThreads
in interface ManagementMBean
public java.lang.Integer getNumberOfThreads()
ManagementMBean
getNumberOfThreads
in interface ManagementMBean
public void setSubFiles(java.lang.String[] sublist)
ManagementMBean
setSubFiles
in interface ManagementMBean
public java.lang.String[] getSubFiles()
ManagementMBean
getSubFiles
in interface ManagementMBean
public java.lang.String getConfigurationFile()
ManagementMBean
getConfigurationFile
in interface ManagementMBean
public java.lang.String getPublishServerURL()
ManagementMBean
getPublishServerURL
in interface ManagementMBean
public void setFileLogLevel(java.util.logging.Level level)
ManagementMBean
setFileLogLevel
in interface ManagementMBean
level
- the level for file loggingpublic void setFileLogPath(java.lang.String path) throws java.io.IOException
ManagementMBean
setFileLogPath
in interface ManagementMBean
path
- String path to where to logjava.io.IOException
- if path does not exist or could be created on serverpublic java.util.logging.Level getConsoleLogLevel()
ManagementMBean
getConsoleLogLevel
in interface ManagementMBean
public java.util.logging.Level getFileLogLevel()
ManagementMBean
getFileLogLevel
in interface ManagementMBean
public java.lang.String getFileLogPath()
ManagementMBean
getFileLogPath
in interface ManagementMBean
public void setPublishServerURL(java.lang.String url)
ManagementMBean
setPublishServerURL
in interface ManagementMBean
url
- String to server for publishing the opengrok.war filepublic void setConsoleLogLevel(java.util.logging.Level level)
ManagementMBean
setConsoleLogLevel
in interface ManagementMBean
level
- the level for console loggingpublic void setConfigurationFile(java.lang.String filename)
ManagementMBean
setConfigurationFile
in interface ManagementMBean
filename
- String name with full path of configurationfile