|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.carol.cmi.admin.CMIAdmin
@ThreadSafe public final class CMIAdmin
Provides methods to admin a cluster. This class is a front end for users of cluster. Low level aspects are delegated at a ClusterViewManager.
| 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. |
static CMIAdmin |
getCMIAdmin()
Returns an instance of CMIAdmin. |
static CMIAdmin |
getCMIAdmin(javax.management.ObjectName objectName,
org.ow2.carol.cmi.controller.common.ClusterViewManager clusterViewManager)
Returns an instance of CMIAdmin MBean. |
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)
|
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.Set<java.lang.String> |
getServerObjectsForProtocol(java.lang.String serverUrl,
java.lang.String protocolName)
Gets objects hosted on a given server started with a given protocol. |
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. |
java.lang.Boolean |
receiveFile(java.lang.Byte[] fileBuff,
java.lang.String fileName,
java.lang.String attributeToSet)
Receive file from remote sender. |
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. |
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
retrieveAvailableLBPoliciesAndStrategies()
Gets available load balancing policies and strategies. |
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. |
static void |
setCMIAdmin(CMIAdmin cmiAdmin)
Set the instance of CMIAdmin. |
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> propertyValue)
Sets a property (a list of value) for a given object. |
void |
setLoadFactor(java.lang.String serverRef,
java.lang.String loadFactor)
Sets the load-factor for the server with the given address. |
void |
setMaxPoolSize(java.lang.String objectName,
java.lang.Integer maxSize)
Sets the maximal size of pool of CMIReferenceable for a object with the given name. |
void |
setMinPoolSize(java.lang.String objectName,
java.lang.Integer minSize)
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static CMIAdmin getCMIAdmin(javax.management.ObjectName objectName,
org.ow2.carol.cmi.controller.common.ClusterViewManager clusterViewManager)
objectName - the name binded in the MBean ServerclusterViewManager - the manager of the cluster view to use
public static CMIAdmin getCMIAdmin()
public static void setCMIAdmin(CMIAdmin cmiAdmin)
cmiAdmin - an instance of CMIAdmin or nullpublic javax.management.ObjectName getObjectName()
getObjectName in interface org.ow2.carol.cmi.admin.CMIAdminMBean
public javax.management.remote.JMXServiceURL getJMXServiceURL(java.lang.String protocolName)
throws java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException
getJMXServiceURL in interface org.ow2.carol.cmi.admin.CMIAdminMBeanprotocolName - a name of protocol
java.lang.IllegalArgumentException - if no object is bound with the given name
java.lang.UnsupportedOperationException - if the used manager is at client-sidepublic java.util.Set<java.lang.String> getProtocols()
getProtocols in interface org.ow2.carol.cmi.admin.CMIAdminMBean
public java.lang.String getItfName(java.lang.String objectName)
throws java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException
getItfName in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of object
java.lang.IllegalArgumentException - if no object is bound with the given name
java.lang.UnsupportedOperationException - if the used manager is at client-side
public java.lang.String getBusinessName(java.lang.String objectName)
throws java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException
getBusinessName in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of object
java.lang.IllegalArgumentException - if none object has the given name
java.lang.UnsupportedOperationException - if the used manager is at client-side
public boolean isReplicated(java.lang.String objectName)
throws java.lang.IllegalArgumentException
isReplicated in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of object
java.lang.IllegalArgumentException - if none object has the given name
public java.util.Set<java.lang.String> getServerRefsForProtocol(java.lang.String protocolName)
throws java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException
getServerRefsForProtocol in interface org.ow2.carol.cmi.admin.CMIAdminMBeanprotocolName - a name of protocol
java.lang.IllegalArgumentException - if the given protocol name doesn't exist
java.lang.UnsupportedOperationException - if the used manager is at client-side
public java.util.Set<java.lang.String> getServerObjectsForProtocol(java.lang.String serverUrl,
java.lang.String protocolName)
throws java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException
getServerObjectsForProtocol in interface org.ow2.carol.cmi.admin.CMIAdminMBeanserverUrl - a server referenceprotocolName - a name of protocol
java.lang.IllegalArgumentException - if the given protocol name doesn't exist or
the server is not registered for the given protocol
java.lang.UnsupportedOperationException - if the used manager is at client-sidepublic java.util.Set<java.lang.String> getObjectNames()
getObjectNames in interface org.ow2.carol.cmi.admin.CMIAdminMBean
public java.lang.String getRefOnLocalRegistry(java.lang.String protocolName)
throws java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException
getRefOnLocalRegistry in interface org.ow2.carol.cmi.admin.CMIAdminMBeanprotocolName - a name of protocol
java.lang.IllegalArgumentException - if the given protocol name doesn't exist
java.lang.UnsupportedOperationException - if the used manager is at client-side
public java.lang.String getLBPolicyClassName(java.lang.String objectName)
throws java.lang.IllegalArgumentException
getLBPolicyClassName in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - name of the object
java.lang.IllegalArgumentException - if none object has the given name
public void setLBPolicyClassName(java.lang.String objectName,
java.lang.String lbPolicyClassName)
throws java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException,
java.lang.ClassNotFoundException
setLBPolicyClassName in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of objectlbPolicyClassName - a name of class of LB policy
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
public java.lang.String getLBStrategyClassName(java.lang.String objectName)
throws java.lang.IllegalArgumentException
getLBStrategyClassName in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - name of the object
java.lang.IllegalArgumentException - if none object has the given name
public void setLBStrategyClassName(java.lang.String objectName,
java.lang.String lbStrategyClassName)
throws java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException,
java.lang.ClassNotFoundException
setLBStrategyClassName in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of objectlbStrategyClassName - a name of class of LB strategy
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
public java.util.Set<java.lang.String> getPropertiesNamesForLBPolicy(java.lang.String objectName)
throws java.lang.IllegalArgumentException
getPropertiesNamesForLBPolicy in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of object
java.lang.IllegalArgumentException - if none object has the given name
public java.util.Set<java.lang.String> getListPropertiesNamesForLBPolicy(java.lang.String objectName)
throws java.lang.IllegalArgumentException
getListPropertiesNamesForLBPolicy in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of object
java.lang.IllegalArgumentException - if none object has the given name
public java.lang.String getPropertyForLBPolicy(java.lang.String objectName,
java.lang.String propertyName)
throws java.lang.IllegalArgumentException
getPropertyForLBPolicy in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of objectpropertyName - a name of property
java.lang.IllegalArgumentException - if none object has the given name, or if the value is a list
public java.util.List<java.lang.String> getListPropertyForLBPolicy(java.lang.String objectName,
java.lang.String propertyName)
throws java.lang.IllegalArgumentException
getListPropertyForLBPolicy in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of objectpropertyName - a name of property
java.lang.IllegalArgumentException - if none object has the given name, or if if the value is not a list
public void setPropertyForLBPolicy(java.lang.String objectName,
java.lang.String propertyName,
java.lang.String propertyValue)
throws java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException
setPropertyForLBPolicy in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of objectpropertyName - a name of propertypropertyValue - a value for the given name of property
java.lang.IllegalArgumentException - if none object has the given name, or if if the property doesn't exist or has an invalid type
java.lang.UnsupportedOperationException - if the used manager is at client-side
public void setListPropertyForLBPolicy(java.lang.String objectName,
java.lang.String propertyName,
java.util.List<java.lang.String> propertyValue)
throws java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException
setListPropertyForLBPolicy in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of objectpropertyName - a name of propertypropertyValue - a list of value for the given name of property
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
public void setPropertiesForLBPolicy(java.lang.String objectName,
java.util.Map<java.lang.String,java.lang.Object> properties)
throws java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException
setPropertiesForLBPolicy in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of objectproperties - properties a set of properties
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
public 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
setAlgorithmForLBPolicy in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of objectlbPolicyClassName - a name of class of LB policylbStrategyClassName - a name of class of LB strategyproperties - a set of properties
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
public java.util.List<java.lang.String> getServerRefs(java.lang.String objectName,
java.lang.String protocolName)
throws java.lang.IllegalArgumentException
getServerRefs in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of objectprotocolName - a name of protocol
java.lang.IllegalArgumentException - if none object has the given name
public java.util.List<java.lang.String> getServerRefs(java.lang.String objectName)
throws java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException
getServerRefs in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of object
java.lang.IllegalArgumentException - if none object has the given name
java.lang.UnsupportedOperationException - if the used manager is at client-side
public java.util.Set<java.lang.String> getClusterNames()
throws java.lang.UnsupportedOperationException
getClusterNames in interface org.ow2.carol.cmi.admin.CMIAdminMBeanjava.lang.UnsupportedOperationException - if the used manager is at client-side
public java.util.Set<java.lang.String> getObjectNames(java.lang.String clusterName)
throws java.lang.UnsupportedOperationException
getObjectNames in interface org.ow2.carol.cmi.admin.CMIAdminMBeanclusterName - The cluster name
java.lang.UnsupportedOperationException - if the used manager is at client-sidepublic java.lang.Integer getDelayToRefresh()
getDelayToRefresh in interface org.ow2.carol.cmi.admin.CMIAdminMBean
public void setDelayToRefresh(java.lang.Integer delay)
throws java.lang.UnsupportedOperationException
setDelayToRefresh in interface org.ow2.carol.cmi.admin.CMIAdminMBeandelay - the time between each update of the cluster view by clients
java.lang.UnsupportedOperationException - if the used manager is at client-side
public java.lang.String getClusterName(java.lang.String objectName)
throws java.lang.IllegalArgumentException
getClusterName in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of object
java.lang.IllegalArgumentException - if none object has the given name
public java.lang.Integer getMaxPoolSize(java.lang.String objectName)
throws java.lang.IllegalArgumentException
getMaxPoolSize in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of object
java.lang.IllegalArgumentException - if none object has the given name
public java.lang.Integer getMinPoolSize(java.lang.String objectName)
throws java.lang.IllegalArgumentException
getMinPoolSize in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of object
java.lang.IllegalArgumentException - if none object has the given name
public boolean isPoolToEmpty(java.lang.String objectName)
throws java.lang.IllegalArgumentException
isPoolToEmpty in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of object
java.lang.IllegalArgumentException - if no object is bound with the given name
public boolean isServerBlackListed(java.lang.String serverName)
throws java.lang.UnsupportedOperationException,
java.net.MalformedURLException,
java.net.UnknownHostException
isServerBlackListed in interface org.ow2.carol.cmi.admin.CMIAdminMBeanserverName - a reference on a server
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
public void addPooltoEmpty(java.lang.String objectName)
throws java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException
addPooltoEmpty in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of object
java.lang.IllegalArgumentException - if no object is bound with the given name
java.lang.UnsupportedOperationException - if the used manager is at client-side
public void addServerToBlackList(java.lang.String serverName)
throws java.lang.UnsupportedOperationException,
java.net.MalformedURLException,
java.net.UnknownHostException
addServerToBlackList in interface org.ow2.carol.cmi.admin.CMIAdminMBeanserverName - a reference on a server
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
public void removePoolToEmpty(java.lang.String objectName)
throws java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException
removePoolToEmpty in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of object
java.lang.IllegalArgumentException - if no object is bound with the given name
java.lang.UnsupportedOperationException - if the used manager is at client-side
public void removeServerFromBlackList(java.lang.String serverName)
throws java.lang.UnsupportedOperationException,
java.net.MalformedURLException,
java.net.UnknownHostException
removeServerFromBlackList in interface org.ow2.carol.cmi.admin.CMIAdminMBeanserverName - a reference on a server
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
public void setMaxPoolSize(java.lang.String objectName,
java.lang.Integer maxSize)
throws java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException
setMaxPoolSize in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of objectmaxSize - the maximal size of pool of CMIReferenceable for a object with the given name
java.lang.IllegalArgumentException - if no object is bound with the given name
java.lang.UnsupportedOperationException - if the used manager is at client-side
public void setMinPoolSize(java.lang.String objectName,
java.lang.Integer minSize)
throws java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException
setMinPoolSize in interface org.ow2.carol.cmi.admin.CMIAdminMBeanobjectName - a name of objectminSize - the minimal size of pool of CMIReferenceable for a object with the given name
java.lang.IllegalArgumentException - if no object is bound with the given name
java.lang.UnsupportedOperationException - if the used manager is at client-side
public java.lang.Integer getLoadFactor(java.lang.String serverRef)
throws java.lang.IllegalArgumentException,
java.net.MalformedURLException,
java.net.UnknownHostException
getLoadFactor in interface org.ow2.carol.cmi.admin.CMIAdminMBeanserverRef - a reference on a server
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
public void setLoadFactor(java.lang.String serverRef,
java.lang.String loadFactor)
throws java.lang.UnsupportedOperationException,
java.net.MalformedURLException,
java.net.UnknownHostException
setLoadFactor in interface org.ow2.carol.cmi.admin.CMIAdminMBeanserverRef - a reference on a serverloadFactor - the load-factor for the server with the given address
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 resolvedpublic java.lang.Integer getNbClientsConnectedToProvider()
getNbClientsConnectedToProvider in interface org.ow2.carol.cmi.admin.CMIAdminMBean
public java.lang.Boolean receiveFile(java.lang.Byte[] fileBuff,
java.lang.String fileName,
java.lang.String attributeToSet)
throws java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException
fileBuff - Byte bufferfileName - The file nameattributeToSet - The attribute to set lbPolicy || lbStrategy
java.lang.IllegalArgumentException
java.lang.UnsupportedOperationException
public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> retrieveAvailableLBPoliciesAndStrategies()
throws java.lang.UnsupportedOperationException
retrieveAvailableLBPoliciesAndStrategies in interface org.ow2.carol.cmi.admin.CMIAdminMBeanjava.lang.UnsupportedOperationException - if the operation is not supported
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||