org.ow2.carol.cmi.controller.provider
Interface ClientClusterViewProvider

All Superinterfaces:
java.rmi.Remote

public interface ClientClusterViewProvider
extends java.rmi.Remote

Interface of providers which offers cluster view to the clients.

Author:
The new CMI team
See Also:
org.ow2.carol.cmi.client.ClientClusterViewManagerImpl

Method Summary
 java.util.Set<java.lang.String> getApplicationExceptions(java.lang.String objectName)
          Return classnames of the application exceptions.
 java.lang.String getBusinessName(java.lang.String objectName)
          Gets the business interface name for a given object.
 byte[] getBytecode(java.lang.String binaryName)
          Returns the bytecode of the class that has the given binary name.
 java.lang.String getClusterName(java.lang.String objectName)
          Return the name of cluster that contains the specified object.
 java.util.List<CMIReference> getCMIReferences(java.lang.String objectName, java.lang.String protocolName)
          Gets the nodes list of a given object and protocol.
 long getDateOfProperties(java.lang.String objectName)
          Returns the date of the last properties for a given object.
 int getDelayToRefresh()
          Returns the delay to refresh the cluster view.
 java.lang.String getItfName(java.lang.String objectName)
          Gets the interface name for a given object.
 java.lang.Class<? extends ILBPolicy> getLBPolicyClass(java.lang.String objectName)
          Gets the class of a given LB policy.
 java.lang.String getLBPolicyClassName(java.lang.String objectName)
          Returns the name of the class of policy for the object with the given name.
 java.lang.Class<? extends ILBStrategy> getLBStrategyClass(java.lang.String objectName)
          Gets a class of strategy for the object with the given name.
 java.lang.String getLBStrategyClassName(java.lang.String objectName)
          Returns the name of the class of strategy for the object with the given name.
 int getLoadFactor(ServerRef serverRef)
          Returns the load-factor for the server with the given address.
 int getMaxPoolSize(java.lang.String objectName)
          Returns the maximal size of pool of CMIReferenceable for a object with the given name.
 int getMinPoolSize(java.lang.String objectName)
          Returns the minimal size of pool of CMIReferenceable for a object with the given name.
 java.util.Map<java.lang.String,java.lang.Object> getPropertiesForLBPolicy(java.lang.String objectName)
          Returns the properties for the object with the given name.
 boolean hasState(java.lang.String objectName)
          Return true if the object with the given name is stateful.
 boolean isClustered(java.lang.String name)
          Returns true if the specified object is clustered.
 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)
          Return true if the object with the given name is replicated for high-availability.
 void registerClient(java.util.UUID uuid)
          Register a new client (for statistic purposes).
 

Method Detail

getLBPolicyClassName

java.lang.String getLBPolicyClassName(java.lang.String objectName)
                                      throws java.rmi.RemoteException,
                                             ObjectNotFoundException
Returns the name of the class of policy for the object with the given name.

Parameters:
objectName - a name of object
Returns:
the name of the class of policy for the object with the given name
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

getLBPolicyClass

java.lang.Class<? extends ILBPolicy> getLBPolicyClass(java.lang.String objectName)
                                                      throws java.rmi.RemoteException,
                                                             ObjectNotFoundException,
                                                             java.lang.ClassNotFoundException
Gets the class of a given LB policy.

Parameters:
objectName - a name of object
Returns:
The corresponding LB policy class
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name
java.lang.ClassNotFoundException

getLBStrategyClassName

java.lang.String getLBStrategyClassName(java.lang.String objectName)
                                        throws java.rmi.RemoteException,
                                               ObjectNotFoundException
Returns the name of the class of strategy for the object with the given name.

Parameters:
objectName - a name of object
Returns:
the name of the class of strategy for the object with the given name
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

getLBStrategyClass

java.lang.Class<? extends ILBStrategy> getLBStrategyClass(java.lang.String objectName)
                                                          throws java.rmi.RemoteException,
                                                                 ObjectNotFoundException,
                                                                 java.lang.ClassNotFoundException
Gets a class of strategy for the object with the given name.

Parameters:
objectName - a name of object
Returns:
a class of strategy for the object with the given name
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name
java.lang.ClassNotFoundException

getDateOfProperties

long getDateOfProperties(java.lang.String objectName)
                         throws java.rmi.RemoteException,
                                ObjectNotFoundException
Returns the date of the last properties for a given object.

Parameters:
objectName - a name of object
Returns:
date of the last properties for a given object
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

getPropertiesForLBPolicy

java.util.Map<java.lang.String,java.lang.Object> getPropertiesForLBPolicy(java.lang.String objectName)
                                                                          throws java.rmi.RemoteException,
                                                                                 ObjectNotFoundException
Returns the properties for the object with the given name.

Parameters:
objectName - a name of object
Returns:
the properties for the object with the given name
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

getCMIReferences

java.util.List<CMIReference> getCMIReferences(java.lang.String objectName,
                                              java.lang.String protocolName)
                                              throws java.rmi.RemoteException,
                                                     ObjectNotFoundException
Gets the nodes list of a given object and protocol.

Parameters:
objectName - The name of object
protocolName - The protocol of the client
Returns:
The nodes list of the given object
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

getBytecode

byte[] getBytecode(java.lang.String binaryName)
                   throws java.rmi.RemoteException,
                          ClientClusterViewProviderException
Returns the bytecode of the class that has the given binary name.

Parameters:
binaryName - a binary name of a class
Returns:
the bytecode of the class that has the given binary name
Throws:
java.rmi.RemoteException - if the connection failed
ClientClusterViewProviderException - if an I/O exception happens on server over the reading of the bytecode

getItfName

java.lang.String getItfName(java.lang.String objectName)
                            throws java.rmi.RemoteException,
                                   ObjectNotFoundException
Gets the interface name for a given object.

Parameters:
objectName - The name of object
Returns:
the interface name of the given object
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

getBusinessName

java.lang.String getBusinessName(java.lang.String objectName)
                                 throws java.rmi.RemoteException,
                                        ObjectNotFoundException
Gets the business interface name for a given object.

Parameters:
objectName - The name of object
Returns:
the business interface name of the given object
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

getClusterName

java.lang.String getClusterName(java.lang.String objectName)
                                throws java.rmi.RemoteException,
                                       ObjectNotFoundException
Return the name of cluster that contains the specified object.

Parameters:
objectName - a name of object
Returns:
the name of cluster that contains the specified object
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

isClustered

boolean isClustered(java.lang.String name)
                    throws java.rmi.RemoteException
Returns true if the specified object is clustered.

Parameters:
name - a name of object
Returns:
true if the specified object is clustered
Throws:
java.rmi.RemoteException - if there are errors on the protocol

getDelayToRefresh

int getDelayToRefresh()
                      throws java.rmi.RemoteException
Returns the delay to refresh the cluster view.

Returns:
the delay to refresh the cluster view
Throws:
java.rmi.RemoteException - if there are errors on the protocol

getMinPoolSize

int getMinPoolSize(java.lang.String objectName)
                   throws java.rmi.RemoteException,
                          ObjectNotFoundException
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.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

getMaxPoolSize

int getMaxPoolSize(java.lang.String objectName)
                   throws java.rmi.RemoteException,
                          ObjectNotFoundException
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.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

isPoolToEmpty

boolean isPoolToEmpty(java.lang.String objectName)
                      throws java.rmi.RemoteException,
                             ObjectNotFoundException
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.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

getLoadFactor

int getLoadFactor(ServerRef serverRef)
                  throws java.rmi.RemoteException,
                         ServerNotFoundException
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.rmi.RemoteException - if there are errors on the protocol
ServerNotFoundException - if none server has the given address

registerClient

void registerClient(java.util.UUID uuid)
                    throws java.rmi.RemoteException
Register a new client (for statistic purposes).

Parameters:
uuid - the Universally Unique Identifier of the client
Throws:
java.rmi.RemoteException - if there are errors on the protocol

isReplicated

boolean isReplicated(java.lang.String objectName)
                     throws java.rmi.RemoteException,
                            ObjectNotFoundException
Return true if the object with the given name is replicated for high-availability.

Parameters:
objectName - a name of object
Returns:
true if the object with the given name is replicated for high-availability
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

hasState

boolean hasState(java.lang.String objectName)
                 throws java.rmi.RemoteException,
                        ObjectNotFoundException
Return true if the object with the given name is stateful.

Parameters:
objectName - a name of object
Returns:
true if the object with the given name is stateful
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name

getApplicationExceptions

java.util.Set<java.lang.String> getApplicationExceptions(java.lang.String objectName)
                                                         throws java.rmi.RemoteException,
                                                                ObjectNotFoundException
Return classnames of the application exceptions.

Parameters:
objectName - a name of object
Returns:
classnames of the application exceptions
Throws:
java.rmi.RemoteException - if there are errors on the protocol
ObjectNotFoundException - if none object has the given name


Copyright © 2008 OW2 Consortium. All Rights Reserved.