org.softamis.cluster4spring.support.invocation
Class DefaultEndpointSelectionPolicy<E extends Endpoint<SI>,SI extends ServiceMoniker>
java.lang.Object
org.softamis.cluster4spring.support.invocation.DefaultEndpointSelectionPolicy<E,SI>
- Type Parameters:
SI
- type of data used to invoke remote service (such as remote service URL)E
- type of endpoints that could be created by this factory
- All Implemented Interfaces:
- EndpointSelectionPolicy<E,SI>
public class DefaultEndpointSelectionPolicy<E extends Endpoint<SI>,SI extends ServiceMoniker>
- extends java.lang.Object
- implements EndpointSelectionPolicy<E,SI>
Policy that performs selection of endpoint for invocation from the given list of available
endpoints. This implementation simply selects the first element from the given list.
- Author:
- Andrew Sazonov
Field Summary |
protected static org.apache.commons.logging.Log |
fLog
|
Method Summary |
E |
selectServiceEndpoint(java.util.List<E> aEndpoints)
Selects endpoint for invocation from the given list of endpoints. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fLog
protected static final org.apache.commons.logging.Log fLog
DefaultEndpointSelectionPolicy
public DefaultEndpointSelectionPolicy()
selectServiceEndpoint
public E selectServiceEndpoint(java.util.List<E> aEndpoints)
throws org.springframework.remoting.RemoteAccessException
- Selects endpoint for invocation from the given list of endpoints. Simply selects
the first element from the list.
- Specified by:
selectServiceEndpoint
in interface EndpointSelectionPolicy<E extends Endpoint<SI>,SI extends ServiceMoniker>
- Parameters:
aEndpoints
- list of endpoints available for invocation of remote service
- Returns:
- selected endpoints
- Throws:
org.springframework.remoting.RemoteAccessException
- throw if some error occured during seleting endpoint for invocation