org.objectweb.petals.tools.webadmin.service
Class NewJMXService

java.lang.Object
  extended by org.objectweb.petals.tools.webadmin.service.NewJMXService

public final class NewJMXService
extends java.lang.Object


Method Summary
static void createNewJmxService(ServerConfiguration serverConf)
          Creates a new JMXService connected to a new server
 java.util.Map<java.lang.String,JBIEntity> getComponents(java.lang.String serverName)
          Gets the components installed on a server
static NewJMXService getJmxService()
          Gets the singleton NewJMXService
 java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> getRawComponents(java.lang.String serverName)
          Gets the components installed on a server
 java.util.List<java.util.Map<java.lang.String,java.lang.String>> getRawServersList()
          Gets the list of all servers known on the domain
 ServerConfiguration getServerConf()
          Return the configuration of the server with which the server communicate
 ServerConfiguration getServerConfiguration(java.lang.String serverName)
          Gets the server configuration of a server by his name
 java.util.List<ServerConfiguration> getServersList()
          Gets the list of all servers known on the domain
 java.util.Map<java.lang.String,JBIEntity> getServicesAssemblies(java.lang.String serverName)
          Temporary method to get all service assemblies
 java.util.List<ServerConfiguration> getStartedServersList()
          Gets only started servers on domain
 java.util.Map<java.lang.Long,java.lang.Long> getTimeDatas(java.lang.String mBeanName, java.lang.String mBeanType, java.lang.String datasetName, long sinceTime)
          Gets a Map of time datas from an MBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createNewJmxService

public static void createNewJmxService(ServerConfiguration serverConf)
Creates a new JMXService connected to a new server

Parameters:
serverConf - the server to contact

getJmxService

public static NewJMXService getJmxService()
Gets the singleton NewJMXService

Returns:
a NewJMXService

getComponents

public java.util.Map<java.lang.String,JBIEntity> getComponents(java.lang.String serverName)
                                                        throws java.io.IOException,
                                                               javax.management.MBeanException
Gets the components installed on a server

Parameters:
serverName - the server's name
Returns:
a Map representation of the components as items
Throws:
java.io.IOException
javax.management.MBeanException

getRawComponents

public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> getRawComponents(java.lang.String serverName)
                                                                                                  throws javax.management.MBeanException,
                                                                                                         java.io.IOException
Gets the components installed on a server

Parameters:
serverName - the server's name
Returns:
a Map representation of the components as items
Throws:
java.io.IOException
javax.management.MBeanException

getServerConfiguration

public ServerConfiguration getServerConfiguration(java.lang.String serverName)
                                           throws javax.management.MBeanException,
                                                  java.io.IOException
Gets the server configuration of a server by his name

Parameters:
serverName - the name of the server
Returns:
a ServerConfiguration representation of the server's informations
Throws:
javax.management.MBeanException - an error occured when communicating with server
java.io.IOException - a communication error occured

getServicesAssemblies

public java.util.Map<java.lang.String,JBIEntity> getServicesAssemblies(java.lang.String serverName)
                                                                throws javax.management.MBeanException
Temporary method to get all service assemblies

Throws:
javax.management.MBeanException

getServersList

public java.util.List<ServerConfiguration> getServersList()
                                                   throws javax.management.MBeanException,
                                                          java.io.IOException
Gets the list of all servers known on the domain

Returns:
a List representation of the servers
Throws:
java.io.IOException - a communication error occured
javax.management.MBeanException - the server throws an exception when communicating with it

getRawServersList

public java.util.List<java.util.Map<java.lang.String,java.lang.String>> getRawServersList()
                                                                                   throws javax.management.MBeanException,
                                                                                          java.io.IOException
Gets the list of all servers known on the domain

Returns:
a List representation of the servers
Throws:
java.io.IOException - a communication error occured
javax.management.MBeanException - the server throws an exception when communicating with it

getStartedServersList

public java.util.List<ServerConfiguration> getStartedServersList()
                                                          throws java.io.IOException,
                                                                 javax.management.MBeanException
Gets only started servers on domain

Returns:
a List representation of ServerConfiguration of each server
Throws:
java.io.IOException
javax.management.MBeanException

getTimeDatas

public java.util.Map<java.lang.Long,java.lang.Long> getTimeDatas(java.lang.String mBeanName,
                                                                 java.lang.String mBeanType,
                                                                 java.lang.String datasetName,
                                                                 long sinceTime)
                                                          throws java.io.IOException,
                                                                 javax.management.MBeanException
Gets a Map of time datas from an MBean

Parameters:
serverConf - the storage server where MBean is registered
mBeanName - an Objetname representation of the MBean's name
mBeanType - a String representation of the MBean's type
attributeName - the attribute of the MBean containing the datas to retrieve
sinceTime - the timestamp of beginning of the retrieval period
Returns:
a Map representation of datas as pairs
Throws:
java.io.IOException
javax.management.MBeanException

getServerConf

public ServerConfiguration getServerConf()
Return the configuration of the server with which the server communicate

Returns:
a ServerConfiguration of a server


Copyright © 2005-2007 ObjectWeb Consortium. All Rights Reserved.