org.ow2.carol.cmi.admin
Interface CMIAdminMBean


public interface CMIAdminMBean

Definition of a MBean to monitor managers of cluster view. In the case of a manager at server-side, we can also configure it with this MBean.

Author:
The new CMI team

Method Summary
 void addPooltoEmpty(java.lang.String objectName)
          Adds the pool of the object with the given name of the list of pool that should be empty.
 void addServerToBlackList(java.lang.String serverName)
          Adds a server to the blacklist.
 java.lang.String getBusinessName(java.lang.String objectName)
          Returns the business interface name of an object bound with the given name (for ejb2 only).
 java.lang.String getClusterName(java.lang.String objectName)
          Returns the name of cluster for the object with the given name.
 java.util.Set<java.lang.String> getClusterNames()
          Returns the set of name of cluster.
 java.lang.Integer getDelayToRefresh()
          Returns the time between each update of the cluster view by clients.
 java.lang.String getItfName(java.lang.String objectName)
          Returns a name of interface of this object.
 javax.management.remote.JMXServiceURL getJMXServiceURL(java.lang.String protocolName)
           
 java.lang.String getLBPolicyClassName(java.lang.String objectName)
          Returns the name of class of policy for the object with the given name.
 java.lang.String getLBStrategyClassName(java.lang.String objectName)
          Returns the name of class of strategy for the object with the given name.
 java.util.Set<java.lang.String> getListPropertiesNamesForLBPolicy(java.lang.String objectName)
          Returns the set of property names (for which value is a list) for the object with the given name.
 java.util.List<java.lang.String> getListPropertyForLBPolicy(java.lang.String objectName, java.lang.String propertyName)
          Returns the list of value of the property with the given name.
 java.lang.Integer getLoadFactor(java.lang.String serverRef)
          Returns the load-factor for the server with the given address.
 java.lang.Integer getMaxPoolSize(java.lang.String objectName)
          Returns the maximal size of pool of CMIReferenceable for a object with the given name.
 java.lang.Integer getMinPoolSize(java.lang.String objectName)
          Returns the minimal size of pool of CMIReferenceable for a object with the given name.
 java.lang.Integer getNbClientsConnectedToProvider()
           
 javax.management.ObjectName getObjectName()
          Returns the ObjectName binded in the MBean Server.
 java.util.Set<java.lang.String> getObjectNames()
           
 java.util.Set<java.lang.String> getObjectNames(java.lang.String clusterName)
          Returns the set of object names included in the given cluster.
 java.util.Set<java.lang.String> getPropertiesNamesForLBPolicy(java.lang.String objectName)
          Returns the set of property names for the object with the given name.
 java.lang.String getPropertyForLBPolicy(java.lang.String objectName, java.lang.String propertyName)
          Returns the value of the property with the given name.
 java.util.Set<java.lang.String> getProtocols()
           
 java.lang.String getRefOnLocalRegistry(java.lang.String protocolName)
           
 java.util.List<java.lang.String> getServerRefs(java.lang.String objectName)
          Returns a list of String representing a ServerRef for an object with the given name.
 java.util.List<java.lang.String> getServerRefs(java.lang.String objectName, java.lang.String protocolName)
          Returns a list of String representing a ServerRef for an object with the given name and protocol.
 java.util.Set<java.lang.String> getServerRefsForProtocol(java.lang.String protocolName)
           
 boolean isPoolToEmpty(java.lang.String objectName)
          Returns true if the pool for object with the given name should be empty.
 boolean isReplicated(java.lang.String objectName)
           
 boolean isServerBlackListed(java.lang.String serverName)
          Returns true the server with the given reference if blacklisted.
 void removePoolToEmpty(java.lang.String objectName)
          Removes the pool of the object with the given name of the list of pool that should be empty.
 void removeServerFromBlackList(java.lang.String serverName)
          Removes a server from the blacklist.
 void setAlgorithmForLBPolicy(java.lang.String objectName, java.lang.String lbPolicyClassName, java.lang.String lbStrategyClassName, java.util.Map<java.lang.String,java.lang.Object> properties)
          Sets the algorithm of load-balancing for the object with the given name.
 void setDelayToRefresh(java.lang.Integer delay)
          Sets the time between each update of the cluster view by clients.
 void setLBPolicyClassName(java.lang.String objectName, java.lang.String lbPolicyClassName)
          Sets a new policy for a given object.
 void setLBStrategyClassName(java.lang.String objectName, java.lang.String lbStrategyClassName)
          Sets a new strategy for a given object.
 void setListPropertyForLBPolicy(java.lang.String objectName, java.lang.String propertyName, java.util.List<java.lang.String> propertyValues)
          Sets a property for a given object.
 void setLoadFactor(java.lang.String serverRef, java.lang.Integer loadFactor)
          Sets the load-factor for the server with the given address.
 void setMaxPoolSize(java.lang.String objectName, java.lang.Integer maxPoolSize)
          Sets the maximal size of pool of CMIReferenceable for a object with the given name.
 void setMinPoolSize(java.lang.String objectName, java.lang.Integer minPoolSize)
          Sets the minimal size of pool of CMIReferenceable for a object with the given name.
 void setPropertiesForLBPolicy(java.lang.String objectName, java.util.Map<java.lang.String,java.lang.Object> properties)
          Sets the properties for a given object.
 void setPropertyForLBPolicy(java.lang.String objectName, java.lang.String propertyName, java.lang.String propertyValue)
          Sets a property for a given object.
 

Method Detail

getObjectName

javax.management.ObjectName getObjectName()
Returns the ObjectName binded in the MBean Server.

Returns:
the ObjectName binded in the MBean Server

getJMXServiceURL

javax.management.remote.JMXServiceURL getJMXServiceURL(java.lang.String protocolName)
                                                       throws java.lang.IllegalArgumentException,
                                                              java.lang.UnsupportedOperationException
Parameters:
protocolName - a name of protocol
Returns:
the JMX service URL to access to this MBean
Throws:
java.lang.IllegalArgumentException - if no object is bound with the given name
java.lang.UnsupportedOperationException - if the used manager is at client-side

getProtocols

java.util.Set<java.lang.String> getProtocols()
                                             throws java.lang.UnsupportedOperationException
Returns:
the protocols registered in the manager
Throws:
java.lang.UnsupportedOperationException - if the used manager is at client-side

getRefOnLocalRegistry

java.lang.String getRefOnLocalRegistry(java.lang.String protocolName)
                                       throws java.lang.IllegalArgumentException,
                                              java.lang.UnsupportedOperationException
Parameters:
protocolName - a name of protocol
Returns:
the reference on the local registry for the given protocol
Throws:
java.lang.IllegalArgumentException - if the given protocol name doesn't exist
java.lang.UnsupportedOperationException - if the used manager is at client-side

getItfName

java.lang.String getItfName(java.lang.String objectName)
                            throws java.lang.IllegalArgumentException,
                                   java.lang.UnsupportedOperationException
Returns a name of interface of this object.

Parameters:
objectName - a name of object
Returns:
a name of interface of this object
Throws:
java.lang.IllegalArgumentException - if no object is bound with the given name
java.lang.UnsupportedOperationException - if the used manager is at client-side

getBusinessName

java.lang.String getBusinessName(java.lang.String objectName)
                                 throws java.lang.IllegalArgumentException,
                                        java.lang.UnsupportedOperationException
Returns the business interface name of an object bound with the given name (for ejb2 only). If the object is not an ejb2, null is returned.

Parameters:
objectName - a name of object
Returns:
the business interface name of an object bound with the given name
Throws:
java.lang.IllegalArgumentException - if none object has the given name
java.lang.UnsupportedOperationException - if the used manager is at client-side

isReplicated

boolean isReplicated(java.lang.String objectName)
                     throws java.lang.IllegalArgumentException
Parameters:
objectName - a name of object
Returns:
true if the object with the given name is replicated
Throws:
java.lang.IllegalArgumentException - if none object has the given name

getServerRefsForProtocol

java.util.Set<java.lang.String> getServerRefsForProtocol(java.lang.String protocolName)
                                                         throws java.lang.IllegalArgumentException,
                                                                java.lang.UnsupportedOperationException
Parameters:
protocolName - a name of protocol
Returns:
the set of references on server connected to this server
Throws:
java.lang.IllegalArgumentException - if the given protocol name doesn't exist
java.lang.UnsupportedOperationException - if the used manager is at client-side

getObjectNames

java.util.Set<java.lang.String> getObjectNames()
                                               throws java.lang.UnsupportedOperationException
Returns:
the set of name of object
Throws:
java.lang.UnsupportedOperationException - if the used manager is at client-side

getLBPolicyClassName

java.lang.String getLBPolicyClassName(java.lang.String objectName)
                                      throws java.lang.IllegalArgumentException
Returns the name of class of policy for the object with the given name.

Parameters:
objectName - name of the object
Returns:
the name of class of policy for the object with the given name
Throws:
java.lang.IllegalArgumentException - if none object has the given name

setLBPolicyClassName

void setLBPolicyClassName(java.lang.String objectName,
                          java.lang.String lbPolicyClassName)
                          throws java.lang.IllegalArgumentException,
                                 java.lang.UnsupportedOperationException,
                                 java.lang.ClassNotFoundException
Sets a new policy for a given object.

Parameters:
objectName - a name of object
lbPolicyClassName - a name of class of LB policy
Throws:
java.lang.IllegalArgumentException - if none object has the given name
java.lang.UnsupportedOperationException - if the used manager is at client-side
java.lang.ClassNotFoundException - if the class is missing

getLBStrategyClassName

java.lang.String getLBStrategyClassName(java.lang.String objectName)
                                        throws java.lang.IllegalArgumentException
Returns the name of class of strategy for the object with the given name.

Parameters:
objectName - name of the object
Returns:
the name of class of strategy for the object with the given name
Throws:
java.lang.IllegalArgumentException - if none object has the given name

setLBStrategyClassName

void setLBStrategyClassName(java.lang.String objectName,
                            java.lang.String lbStrategyClassName)
                            throws java.lang.IllegalArgumentException,
                                   java.lang.UnsupportedOperationException,
                                   java.lang.ClassNotFoundException
Sets a new strategy for a given object.

Parameters:
objectName - a name of object
lbStrategyClassName - a name of class of LB strategy
Throws:
java.lang.IllegalArgumentException - if none object has the given name
java.lang.UnsupportedOperationException - if the used manager is at client-side
java.lang.ClassNotFoundException - if the class is missing

getPropertiesNamesForLBPolicy

java.util.Set<java.lang.String> getPropertiesNamesForLBPolicy(java.lang.String objectName)
                                                              throws java.lang.IllegalArgumentException
Returns the set of property names for the object with the given name.

Parameters:
objectName - a name of object
Returns:
the set of property names for the object with the given name
Throws:
java.lang.IllegalArgumentException - if none object has the given name

getListPropertiesNamesForLBPolicy

java.util.Set<java.lang.String> getListPropertiesNamesForLBPolicy(java.lang.String objectName)
                                                                  throws java.lang.IllegalArgumentException
Returns the set of property names (for which value is a list) for the object with the given name.

Parameters:
objectName - a name of object
Returns:
the set of property names for the object with the given name
Throws:
java.lang.IllegalArgumentException - if none object has the given name

getPropertyForLBPolicy

java.lang.String getPropertyForLBPolicy(java.lang.String objectName,
                                        java.lang.String propertyName)
                                        throws java.lang.IllegalArgumentException
Returns the value of the property with the given name.

Parameters:
objectName - a name of object
propertyName - a name of property
Returns:
the value of the property with the given name, or null if there is not property for this name
Throws:
java.lang.IllegalArgumentException - if none object has the given name, or if the value is a list

getListPropertyForLBPolicy

java.util.List<java.lang.String> getListPropertyForLBPolicy(java.lang.String objectName,
                                                            java.lang.String propertyName)
                                                            throws java.lang.IllegalArgumentException
Returns the list of value of the property with the given name.

Parameters:
objectName - a name of object
propertyName - a name of property
Returns:
the list of value of the property with the given name, or null if there is not property for this name
Throws:
java.lang.IllegalArgumentException - if none object has the given name, or if the value is not a list

setPropertyForLBPolicy

void setPropertyForLBPolicy(java.lang.String objectName,
                            java.lang.String propertyName,
                            java.lang.String propertyValue)
                            throws java.lang.IllegalArgumentException,
                                   java.lang.UnsupportedOperationException
Sets a property for a given object. A property is either a String or a list of String.

Parameters:
objectName - a name of object
propertyName - a name of property
propertyValue - a value for the given name of property
Throws:
java.lang.IllegalArgumentException - if none object has the given name, or if the property doesn't exist or has an invalid type
java.lang.UnsupportedOperationException - if the used manager is at client-side

setListPropertyForLBPolicy

void setListPropertyForLBPolicy(java.lang.String objectName,
                                java.lang.String propertyName,
                                java.util.List<java.lang.String> propertyValues)
                                throws java.lang.IllegalArgumentException,
                                       java.lang.UnsupportedOperationException
Sets a property for a given object. A property is either a String or a list of String.

Parameters:
objectName - a name of object
propertyName - a name of property
propertyValues - a list of value for the given name of property
Throws:
java.lang.IllegalArgumentException - if none object has the given name, or if the property doesn't exist or has an invalid type
java.lang.UnsupportedOperationException - if the used manager is at client-side

setPropertiesForLBPolicy

void setPropertiesForLBPolicy(java.lang.String objectName,
                              java.util.Map<java.lang.String,java.lang.Object> properties)
                              throws java.lang.IllegalArgumentException,
                                     java.lang.UnsupportedOperationException
Sets the properties for a given object. A property is either a String or a list of String.

Parameters:
objectName - a name of object
properties - properties a set of properties
Throws:
java.lang.IllegalArgumentException - if none object has the given name, or if a property doesn't exist or has an invalid type
java.lang.UnsupportedOperationException - if the used manager is at client-side

setAlgorithmForLBPolicy

void setAlgorithmForLBPolicy(java.lang.String objectName,
                             java.lang.String lbPolicyClassName,
                             java.lang.String lbStrategyClassName,
                             java.util.Map<java.lang.String,java.lang.Object> properties)
                             throws java.lang.IllegalArgumentException,
                                    java.lang.UnsupportedOperationException,
                                    java.lang.ClassNotFoundException
Sets the algorithm of load-balancing for the object with the given name.

Parameters:
objectName - a name of object
lbPolicyClassName - a name of class of LB policy
lbStrategyClassName - a name of class of LB strategy
properties - a set of properties
Throws:
java.lang.IllegalArgumentException - if none object has the given name, or if a property doesn't exist or has an invalid type
java.lang.UnsupportedOperationException - if the used manager is at client-side
java.lang.ClassNotFoundException - if the class is missing

getServerRefs

java.util.List<java.lang.String> getServerRefs(java.lang.String objectName,
                                               java.lang.String protocolName)
                                               throws java.lang.IllegalArgumentException
Returns a list of String representing a ServerRef for an object with the given name and protocol.

Parameters:
objectName - a name of object
protocolName - a name of protocol
Returns:
a list of String representing a ServerRef for an object with the given name and protocol
Throws:
java.lang.IllegalArgumentException - if none object has the given name

getServerRefs

java.util.List<java.lang.String> getServerRefs(java.lang.String objectName)
                                               throws java.lang.IllegalArgumentException,
                                                      java.lang.UnsupportedOperationException
Returns a list of String representing a ServerRef for an object with the given name.

Parameters:
objectName - a name of object
Returns:
a list of String representing a ServerRef for an object with the given name
Throws:
java.lang.IllegalArgumentException - if none object has the given name
java.lang.UnsupportedOperationException - if the used manager is at client-side

getClusterNames

java.util.Set<java.lang.String> getClusterNames()
                                                throws java.lang.UnsupportedOperationException
Returns the set of name of cluster.

Returns:
the set of name of cluster
Throws:
java.lang.UnsupportedOperationException - if the used manager is at client-side

getObjectNames

java.util.Set<java.lang.String> getObjectNames(java.lang.String clusterName)
                                               throws java.lang.UnsupportedOperationException,
                                                      java.lang.IllegalArgumentException
Returns the set of object names included in the given cluster.

Parameters:
clusterName - The cluster name
Returns:
a set of object names included in the given cluster
Throws:
java.lang.UnsupportedOperationException - if the used manager is at client-side
java.lang.IllegalArgumentException - if none cluster has the given name

getDelayToRefresh

java.lang.Integer getDelayToRefresh()
Returns the time between each update of the cluster view by clients.

Returns:
the time between each update of the cluster view by clients

setDelayToRefresh

void setDelayToRefresh(java.lang.Integer delay)
                       throws java.lang.UnsupportedOperationException
Sets the time between each update of the cluster view by clients.

Parameters:
delay - the time between each update of the cluster view by clients
Throws:
java.lang.UnsupportedOperationException - if the used manager is at client-side

getClusterName

java.lang.String getClusterName(java.lang.String objectName)
                                throws java.lang.IllegalArgumentException
Returns the name of cluster for the object with the given name.

Parameters:
objectName - a name of object
Returns:
the name of cluster for a object with the given name
Throws:
java.lang.IllegalArgumentException - if none object has the given name

getMinPoolSize

java.lang.Integer getMinPoolSize(java.lang.String objectName)
                                 throws java.lang.IllegalArgumentException
Returns the minimal size of pool of CMIReferenceable for a object with the given name.

Parameters:
objectName - a name of object
Returns:
the minimal size of pool of CMIReferenceable for a object with the given name
Throws:
java.lang.IllegalArgumentException - if none object has the given name

getMaxPoolSize

java.lang.Integer getMaxPoolSize(java.lang.String objectName)
                                 throws java.lang.IllegalArgumentException
Returns the maximal size of pool of CMIReferenceable for a object with the given name.

Parameters:
objectName - a name of object
Returns:
the maximal size of pool of CMIReferenceable for a object with the given name
Throws:
java.lang.IllegalArgumentException - if none object has the given name

setMinPoolSize

void setMinPoolSize(java.lang.String objectName,
                    java.lang.Integer minPoolSize)
                    throws java.lang.IllegalArgumentException,
                           java.lang.UnsupportedOperationException
Sets the minimal size of pool of CMIReferenceable for a object with the given name.

Parameters:
objectName - a name of object
minPoolSize - the minimal size of pool of CMIReferenceable for a object with the given name
Throws:
java.lang.IllegalArgumentException - if no object is bound with the given name
java.lang.UnsupportedOperationException - if the used manager is at client-side

setMaxPoolSize

void setMaxPoolSize(java.lang.String objectName,
                    java.lang.Integer maxPoolSize)
                    throws java.lang.IllegalArgumentException,
                           java.lang.UnsupportedOperationException
Sets the maximal size of pool of CMIReferenceable for a object with the given name.

Parameters:
objectName - a name of object
maxPoolSize - the maximal size of pool of CMIReferenceable for a object with the given name
Throws:
java.lang.IllegalArgumentException - if no object is bound with the given name
java.lang.UnsupportedOperationException - if the used manager is at client-side

addServerToBlackList

void addServerToBlackList(java.lang.String serverName)
                          throws java.lang.UnsupportedOperationException,
                                 java.net.MalformedURLException,
                                 java.net.UnknownHostException
Adds a server to the blacklist.

Parameters:
serverName - a reference on a server
Throws:
java.lang.UnsupportedOperationException - if the used manager is at client-side
java.net.MalformedURLException - if the URL is malformed
java.net.UnknownHostException - if the given host cannot be resolved

removeServerFromBlackList

void removeServerFromBlackList(java.lang.String serverName)
                               throws java.lang.UnsupportedOperationException,
                                      java.net.MalformedURLException,
                                      java.net.UnknownHostException
Removes a server from the blacklist.

Parameters:
serverName - a reference on a server
Throws:
java.lang.UnsupportedOperationException - if the used manager is at client-side
java.net.MalformedURLException - if the URL is malformed
java.net.UnknownHostException - if the given host cannot be resolved

isServerBlackListed

boolean isServerBlackListed(java.lang.String serverName)
                            throws java.lang.UnsupportedOperationException,
                                   java.net.MalformedURLException,
                                   java.net.UnknownHostException
Returns true the server with the given reference if blacklisted.

Parameters:
serverName - a reference on a server
Returns:
true the server with the given reference if blacklisted
Throws:
java.lang.UnsupportedOperationException - if the used manager is at client-side
java.net.MalformedURLException - if the URL is malformed
java.net.UnknownHostException - if the given host cannot be resolved

addPooltoEmpty

void addPooltoEmpty(java.lang.String objectName)
                    throws java.lang.IllegalArgumentException,
                           java.lang.UnsupportedOperationException
Adds the pool of the object with the given name of the list of pool that should be empty.

Parameters:
objectName - a name of object
Throws:
java.lang.IllegalArgumentException - if no object is bound with the given name
java.lang.UnsupportedOperationException - if the used manager is at client-side

removePoolToEmpty

void removePoolToEmpty(java.lang.String objectName)
                       throws java.lang.IllegalArgumentException,
                              java.lang.UnsupportedOperationException
Removes the pool of the object with the given name of the list of pool that should be empty.

Parameters:
objectName - a name of object
Throws:
java.lang.IllegalArgumentException - if no object is bound with the given name
java.lang.UnsupportedOperationException - if the used manager is at client-side

isPoolToEmpty

boolean isPoolToEmpty(java.lang.String objectName)
                      throws java.lang.IllegalArgumentException
Returns true if the pool for object with the given name should be empty.

Parameters:
objectName - a name of object
Returns:
true if the pool for object with the given name should be empty
Throws:
java.lang.IllegalArgumentException - if no object is bound with the given name

getLoadFactor

java.lang.Integer getLoadFactor(java.lang.String serverRef)
                                throws java.lang.IllegalArgumentException,
                                       java.net.MalformedURLException,
                                       java.net.UnknownHostException
Returns the load-factor for the server with the given address.

Parameters:
serverRef - a reference on a server
Returns:
the load-factor for the server with the given address
Throws:
java.lang.IllegalArgumentException - if none server has the given address
java.net.MalformedURLException - if the URL is malformed
java.net.UnknownHostException - if the given host cannot be resolved

setLoadFactor

void setLoadFactor(java.lang.String serverRef,
                   java.lang.Integer loadFactor)
                   throws java.lang.UnsupportedOperationException,
                          java.net.MalformedURLException,
                          java.net.UnknownHostException
Sets the load-factor for the server with the given address.

Parameters:
serverRef - a reference on a server
loadFactor - the load-factor for the server with the given address
Throws:
java.lang.UnsupportedOperationException - if the used manager is at client-side
java.net.MalformedURLException - if the URL is malformed
java.net.UnknownHostException - if the given host cannot be resolved

getNbClientsConnectedToProvider

java.lang.Integer getNbClientsConnectedToProvider()
Returns:
the numbers of clients connected to a provider of the cluster view


Copyright © 2007 OW2 Consortium. All Rights Reserved.