|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
jrunx.kernel.ServiceAdapter | +--jrunx.kernel.agents.JRunAdminService
This service is capable of calling MBeanServer methods on the server using delegation to the local MBeanServer. Instead of invoking it directly on the server, which is not available to remote administrator code, remote code can invoke the MBeanServer method on this remotable service, which will then delegate the invocation to its local MBeanServer.
| Fields inherited from class jrunx.kernel.ServiceAdapter |
DEFAULT_DEACTIVATED, DEFAULT_DOMAIN, DOMAIN_NAME_SEPARATOR, DOMAIN_NAME_SUFFIX, domainName, jndiBindable, LOGGER_CACHE_TIME, SCHEDULER_SERVICE, SECURITY_MANAGER, server, status, TRANSACTION_MANAGER |
| Fields inherited from interface jrunx.kernel.agents.JRunAdminServiceMBean |
OBJECT_NAME |
| Fields inherited from interface jrunx.kernel.Service |
INITIALIZED, STARTED, STARTING, STOPPED, STOPPING, UNINITIALIZED |
| Constructor Summary | |
JRunAdminService()
|
|
| Method Summary | |
void |
addOfflineServicePropertyValue(java.lang.String serverName,
java.lang.String servicePath,
java.lang.String attribute,
java.lang.String value)
Allow adding a new offline property value for .xml files for properties which have more than one value |
void |
addServer(java.lang.String serverName,
java.lang.String serverPath)
Adds a pre-existing server directory |
void |
createServer(java.lang.String serverName,
java.lang.String serverPath,
java.lang.String templatePath)
Creates a new server directory |
void |
createService(java.lang.String parentServicePath,
java.lang.String className,
java.lang.String name,
java.util.HashMap attributes)
Allow creation of service metadata directly upon the file for the current server |
void |
deleteServer(java.lang.String serverName,
boolean removeDirectory)
Deletes a server directory |
long |
fileLength(java.lang.String serverName,
java.lang.String path)
Returns the size of the file refered to by the specified path |
java.net.URL |
fileToURL(java.lang.String path)
Returns the URL for this server for the specified file path |
java.lang.String |
getAbsolutePath(java.lang.String serverName,
java.lang.String path)
Returns the absolute path to the specified path string, with all variables resolved |
java.lang.Object |
getAttribute(javax.management.ObjectName objectName,
java.lang.String attributeName)
Follow the standard JMX API for getting MBean attributes |
java.util.List |
getAttributes(javax.management.ObjectName objectName,
java.lang.String[] attributeNames)
Follow the standard JMX API for getting MBean attributes |
java.lang.String |
getFileName(java.lang.String serverName,
java.lang.String path)
Returns the actual name of the file referenced by the path |
long |
getFreeMemory()
|
java.lang.String |
getJVMConfigProperty(java.lang.String property)
|
javax.management.MBeanInfo |
getMBeanInfo(javax.management.ObjectName objectName)
Follow the standard JMX API for getting MBeanInfo |
java.lang.String |
getOfflineJNDIProperty(java.lang.String serverName,
java.lang.String property)
Allow retrieval of offline property values for .properties files |
java.lang.String |
getOfflineServiceProperty(java.lang.String serverName,
java.lang.String servicePath,
java.lang.String attribute)
Allow retrieval of offline property values for .xml files for properties which have only one value |
java.util.List |
getOfflineServicePropertyValues(java.lang.String serverName,
java.lang.String servicePath,
java.lang.String attribute)
Allow retrieving all offline property values for .xml files for properties which have more than one value |
java.util.List |
getOfflineServices(java.lang.String serverName,
java.lang.String servicePath,
java.lang.String classname,
boolean recurseServices)
Retrieves the services in jrun.xml under the specified path that specify the given classname. |
java.lang.String |
getParentFile(java.lang.String serverName,
java.lang.String path)
Returns the path to the parent of the specified path |
java.lang.String |
getServerMetadataAttribute(java.lang.String serverName,
java.lang.String property)
|
java.lang.String |
getServerPath(java.lang.String serverName)
Returns the server directory for a given server |
long |
getTotalMemory()
Get free/total memory of the Server VM. |
java.lang.Object |
invoke(javax.management.ObjectName objectName,
java.lang.String methodName,
java.lang.Object[] args,
java.lang.String[] argTypes)
Follow the standard JMX API for invoking MBean methods |
boolean |
isDirectory(java.lang.String serverName,
java.lang.String path)
Indicates whether a path refers to a directory |
boolean |
isRegistered(javax.management.ObjectName objectName)
Follow the standard JMX API for checking whether an MBean is registered |
long |
lastModified(java.lang.String serverName,
java.lang.String path)
Returns the last modified timestamp of the specified path |
java.lang.String[] |
listFiles(java.lang.String serverName,
java.lang.String path)
Returns a list of files located at the given path |
java.lang.String[] |
listReadOnlyFiles(java.lang.String serverName,
java.lang.String path)
Recursively lists all read-only files of a given directory |
java.lang.String[] |
listRoots()
List the available drives for this JVM. |
java.lang.String[] |
listRoots(long millisTimeout)
|
int[] |
listServerPortsUsed(java.lang.String serverName)
|
java.util.List |
listServers()
Returns a list of the servers defined for this machine |
boolean |
pathExists(java.lang.String serverName,
java.lang.String path)
Indicates whether a directory exists |
java.util.Set |
queryMBeans(javax.management.ObjectName objectName,
jrunx.kernel.agents.QueryExp query)
Follow the standard JMX API for querying MBean instances |
FileView |
readFile(java.lang.String serverName,
java.lang.String path,
FileView viewer)
Reads the specified file using the specified viewer, and returns the results in the viewer data structure. |
void |
removeAllOfflineServicePropertyValues(java.lang.String serverName,
java.lang.String servicePath,
java.lang.String attribute)
Allow removing all offline property values for .xml files for properties which have more than one value |
void |
removeOfflineServicePropertyValue(java.lang.String serverName,
java.lang.String servicePath,
java.lang.String attribute,
java.lang.String value)
Allow removing an offline property value for .xml files for properties which have more than one value |
void |
removeService(java.lang.String servicePath)
Allow removal of service metadata directly upon the file for the current server |
void |
restartServer(java.lang.String serverName)
Tells the Launcher to restart a server |
int |
serverStatus()
|
java.lang.Boolean |
serverStatus(java.lang.String serverName)
Check if server is running |
void |
setAttribute(javax.management.ObjectName objectName,
javax.management.Attribute attribute)
Follow the standard JMX API for setting MBean attributes |
void |
setAttributes(javax.management.ObjectName objectName,
jrunx.kernel.agents.AttributeList attributes)
Follow the standard JMX API for setting MBean attributes |
void |
setJVMConfigProperty(java.lang.String property,
java.lang.String value)
|
void |
setOfflineJNDIProperty(java.lang.String serverName,
java.lang.String property,
java.lang.String value)
Allow offline property value modification for .properties files |
void |
setOfflineServiceProperty(java.lang.String serverName,
java.lang.String servicePath,
java.lang.String attribute,
java.lang.String value)
Allow offline property value modification for .xml files for properties which have only one value |
void |
setServerMetadataAttribute(java.lang.String serverName,
java.lang.String property,
java.lang.String value)
|
void |
startServer(java.lang.String serverName)
Tells the Launcher to start a server |
void |
stopServer(java.lang.String serverName)
Tells the Launcher to stop a server |
void |
testDataSource(java.lang.String dataSourceName)
Verify whether the connection to a data source is still open |
| Methods inherited from interface jrunx.kernel.ServiceMBean |
bind, getBindToJNDI, getDeactivated, getDomainName, getJRunService, getLogger, getName, getParentService, getServerName, requestServer, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, unbind |
| Methods inherited from interface jrunx.kernel.Service |
destroy, getStatus, init, start, stop, updateStatus |
| Constructor Detail |
public JRunAdminService()
| Method Detail |
public long getTotalMemory()
JRunAdminServiceMBeangetTotalMemory in interface JRunAdminServiceMBeanpublic long getFreeMemory()
getFreeMemory in interface JRunAdminServiceMBean
public java.lang.Object invoke(javax.management.ObjectName objectName,
java.lang.String methodName,
java.lang.Object[] args,
java.lang.String[] argTypes)
throws java.lang.Exception
invoke in interface JRunAdminServiceMBean
public java.lang.Object getAttribute(javax.management.ObjectName objectName,
java.lang.String attributeName)
throws java.lang.Exception
getAttribute in interface JRunAdminServiceMBean
public java.util.List getAttributes(javax.management.ObjectName objectName,
java.lang.String[] attributeNames)
throws java.lang.Exception
getAttributes in interface JRunAdminServiceMBean
public void setAttributes(javax.management.ObjectName objectName,
jrunx.kernel.agents.AttributeList attributes)
throws java.lang.Exception
setAttributes in interface JRunAdminServiceMBean
public void setAttribute(javax.management.ObjectName objectName,
javax.management.Attribute attribute)
throws java.lang.Exception
setAttribute in interface JRunAdminServiceMBean
public java.util.Set queryMBeans(javax.management.ObjectName objectName,
jrunx.kernel.agents.QueryExp query)
throws java.lang.Exception
queryMBeans in interface JRunAdminServiceMBean
public javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName objectName)
throws java.lang.Exception
getMBeanInfo in interface JRunAdminServiceMBean
public boolean isRegistered(javax.management.ObjectName objectName)
throws javax.management.RuntimeOperationsException
isRegistered in interface JRunAdminServiceMBeanpublic java.lang.String[] listRoots()
listRoots in interface JRunAdminServiceMBeanpublic java.lang.String[] listRoots(long millisTimeout)
listRoots in interface JRunAdminServiceMBean
public java.lang.String getAbsolutePath(java.lang.String serverName,
java.lang.String path)
getAbsolutePath in interface JRunAdminServiceMBean
public boolean pathExists(java.lang.String serverName,
java.lang.String path)
pathExists in interface JRunAdminServiceMBean
public boolean isDirectory(java.lang.String serverName,
java.lang.String path)
isDirectory in interface JRunAdminServiceMBean
public java.lang.String getFileName(java.lang.String serverName,
java.lang.String path)
getFileName in interface JRunAdminServiceMBean
public java.lang.String getParentFile(java.lang.String serverName,
java.lang.String path)
getParentFile in interface JRunAdminServiceMBean
public java.lang.String[] listFiles(java.lang.String serverName,
java.lang.String path)
listFiles in interface JRunAdminServiceMBean
public long lastModified(java.lang.String serverName,
java.lang.String path)
lastModified in interface JRunAdminServiceMBean
public long fileLength(java.lang.String serverName,
java.lang.String path)
fileLength in interface JRunAdminServiceMBean
public java.lang.String[] listReadOnlyFiles(java.lang.String serverName,
java.lang.String path)
listReadOnlyFiles in interface JRunAdminServiceMBean
public java.net.URL fileToURL(java.lang.String path)
throws java.net.MalformedURLException
fileToURL in interface JRunAdminServiceMBean
public java.util.List listServers()
throws java.lang.Exception
listServers in interface JRunAdminServiceMBeanpublic java.lang.String getServerPath(java.lang.String serverName)
getServerPath in interface JRunAdminServiceMBean
public void createServer(java.lang.String serverName,
java.lang.String serverPath,
java.lang.String templatePath)
throws java.lang.Exception
createServer in interface JRunAdminServiceMBeanserverName - the name of the serverserverPath - the path of the new server directorytemplatePath - the path of a template server
public void addServer(java.lang.String serverName,
java.lang.String serverPath)
throws java.lang.Exception
addServer in interface JRunAdminServiceMBeanserverName - the name of the serverserverPath - the path of the server directory
public void deleteServer(java.lang.String serverName,
boolean removeDirectory)
throws java.lang.Exception
deleteServer in interface JRunAdminServiceMBean
public java.lang.String getServerMetadataAttribute(java.lang.String serverName,
java.lang.String property)
throws java.lang.Exception
getServerMetadataAttribute in interface JRunAdminServiceMBean
public void setServerMetadataAttribute(java.lang.String serverName,
java.lang.String property,
java.lang.String value)
throws java.lang.Exception
setServerMetadataAttribute in interface JRunAdminServiceMBean
public java.lang.String getJVMConfigProperty(java.lang.String property)
throws java.lang.Exception
getJVMConfigProperty in interface JRunAdminServiceMBean
public void setJVMConfigProperty(java.lang.String property,
java.lang.String value)
throws java.lang.Exception
setJVMConfigProperty in interface JRunAdminServiceMBean
public java.lang.String getOfflineJNDIProperty(java.lang.String serverName,
java.lang.String property)
throws java.lang.Exception
getOfflineJNDIProperty in interface JRunAdminServiceMBeanserverName - the server to look at, which must existproperty - the property to read
public void setOfflineJNDIProperty(java.lang.String serverName,
java.lang.String property,
java.lang.String value)
throws java.lang.Exception
setOfflineJNDIProperty in interface JRunAdminServiceMBeanserverName - the server to look at, which must existproperty - the property to changevalue - the value to store
public int[] listServerPortsUsed(java.lang.String serverName)
throws java.lang.Exception
listServerPortsUsed in interface JRunAdminServiceMBean
public java.util.List getOfflineServices(java.lang.String serverName,
java.lang.String servicePath,
java.lang.String classname,
boolean recurseServices)
throws java.lang.Exception
getOfflineServices in interface JRunAdminServiceMBeanserverName - the server to look at, which must existservicePath - a period-delimited path using the service names, which must
existclassname - a class against which to match the servicerecurseServices - if true, then search for services recursively
public java.lang.String getOfflineServiceProperty(java.lang.String serverName,
java.lang.String servicePath,
java.lang.String attribute)
throws java.lang.Exception
getOfflineServiceProperty in interface JRunAdminServiceMBeanserverName - the server to look at, which must existservicePath - a period-delimited path using the service names, which must
exist
public void setOfflineServiceProperty(java.lang.String serverName,
java.lang.String servicePath,
java.lang.String attribute,
java.lang.String value)
throws java.lang.Exception
setOfflineServiceProperty in interface JRunAdminServiceMBeanserverName - the server to look at, which must existservicePath - a period-delimited path using the service names, which must
existattribute - the attribute to setvalue - the value to set for the attribute
public void addOfflineServicePropertyValue(java.lang.String serverName,
java.lang.String servicePath,
java.lang.String attribute,
java.lang.String value)
throws java.lang.Exception
addOfflineServicePropertyValue in interface JRunAdminServiceMBeanserverName - the server to look at, which must existservicePath - a period-delimited path using the service names, which must
existattribute - the attribute to setvalue - the value to add for the attribute
public void removeOfflineServicePropertyValue(java.lang.String serverName,
java.lang.String servicePath,
java.lang.String attribute,
java.lang.String value)
throws java.lang.Exception
removeOfflineServicePropertyValue in interface JRunAdminServiceMBeanserverName - the server to look at, which must existservicePath - a period-delimited path using the service names, which must
existattribute - the attribute to changevalue - the value to match against for the attribute
public void removeAllOfflineServicePropertyValues(java.lang.String serverName,
java.lang.String servicePath,
java.lang.String attribute)
throws java.lang.Exception
removeAllOfflineServicePropertyValues in interface JRunAdminServiceMBeanserverName - the server to look at, which must existservicePath - a period-delimited path using the service names, which must
existattribute - the attribute to remove
public java.util.List getOfflineServicePropertyValues(java.lang.String serverName,
java.lang.String servicePath,
java.lang.String attribute)
throws java.lang.Exception
getOfflineServicePropertyValues in interface JRunAdminServiceMBeanserverName - the server to look at, which must existservicePath - a period-delimited path using the service names, which must
existattribute - the attribute to retrieve
public void createService(java.lang.String parentServicePath,
java.lang.String className,
java.lang.String name,
java.util.HashMap attributes)
throws java.lang.Exception
createService in interface JRunAdminServiceMBeanparentServicePath - a period-delimited path using the service names,
which must existclassName - the class that implements the servicename - the name of the serviceattributes - the attributes for the service
public void removeService(java.lang.String servicePath)
throws java.lang.Exception
removeService in interface JRunAdminServiceMBeanservicePath - a period-delimited path using the service names, which must
exist
public void startServer(java.lang.String serverName)
throws java.lang.Exception
startServer in interface JRunAdminServiceMBean
public void stopServer(java.lang.String serverName)
throws java.lang.Exception
stopServer in interface JRunAdminServiceMBean
public void restartServer(java.lang.String serverName)
throws java.lang.Exception
restartServer in interface JRunAdminServiceMBean
public java.lang.Boolean serverStatus(java.lang.String serverName)
throws java.lang.Exception
serverStatus in interface JRunAdminServiceMBeanpublic int serverStatus()
serverStatus in interface JRunAdminServiceMBean
public FileView readFile(java.lang.String serverName,
java.lang.String path,
FileView viewer)
throws java.lang.Exception
readFile in interface JRunAdminServiceMBean
public void testDataSource(java.lang.String dataSourceName)
throws java.lang.Exception
testDataSource in interface JRunAdminServiceMBean
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||