com.metamatrix.platform.service.proxy
Interface ServiceSelectionPolicy

All Known Implementing Classes:
RandomSelectionPolicy, RoundRobinSelectionPolicy

public interface ServiceSelectionPolicy

Represents a selection policy for services of a given type.


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)
           
 

Method Detail

getNextInstance

ServiceRegistryBinding getNextInstance()
                                       throws ServiceNotFoundException
Get the next service instance from the given service selection policy.

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

getInstances

java.util.List<ServiceRegistryBinding> getInstances()
                                                    throws ServiceNotFoundException
Get list of instances from the given service selection policy.

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

updateServices

void updateServices(java.util.List<ServiceRegistryBinding> localServices,
                    java.util.List<ServiceRegistryBinding> remoteServices)


Copyright © 2009. All Rights Reserved.