com.metamatrix.platform.service.proxy
Class RandomSelectionPolicy

java.lang.Object
  extended by com.metamatrix.platform.service.proxy.RandomSelectionPolicy
All Implemented Interfaces:
ServiceSelectionPolicy

public class RandomSelectionPolicy
extends java.lang.Object
implements ServiceSelectionPolicy


Constructor Summary
RandomSelectionPolicy(boolean preferLocal)
          ctor
 
Method Summary
 java.util.List<ServiceRegistryBinding> getInstances()
          Get list of instances from the given service selection policy.
 ServiceRegistryBinding getNextInstance()
          Get the next service instance from the given service selection policy.
 void updateServices(java.util.List<ServiceRegistryBinding> localServices, java.util.List<ServiceRegistryBinding> remoteServices)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomSelectionPolicy

public RandomSelectionPolicy(boolean preferLocal)
ctor

Method Detail

getInstances

public java.util.List<ServiceRegistryBinding> getInstances()
                                                    throws ServiceNotFoundException
Description copied from interface: ServiceSelectionPolicy
Get list of instances from the given service selection policy.

Specified by:
getInstances in interface ServiceSelectionPolicy
Returns:
The List of ServiceRegistryBinding objects for the instances after being operated on by the selection policy.
Throws:
ServiceNotFoundException - if the policy has no more services to hand out.
See Also:
com.metamatrix.common.service.ServiceInterface

getNextInstance

public ServiceRegistryBinding getNextInstance()
                                       throws ServiceNotFoundException
Description copied from interface: ServiceSelectionPolicy
Get the next service instance from the given service selection policy.

Specified by:
getNextInstance in interface ServiceSelectionPolicy
Returns:
The ServiceRegistryBinding for the next instance after being operated on by the selection policy.
Throws:
ServiceNotFoundException - if the policy has no more services to hand out.
See Also:
com.metamatrix.common.service.ServiceInterface

updateServices

public void updateServices(java.util.List<ServiceRegistryBinding> localServices,
                           java.util.List<ServiceRegistryBinding> remoteServices)
Specified by:
updateServices in interface ServiceSelectionPolicy


Copyright © 2009. All Rights Reserved.