com.webify.wsf.engine.mediation
Class EndpointSelection

java.lang.Object
  extended by com.webify.wsf.engine.mediation.EndpointSelection

public abstract class EndpointSelection
extends java.lang.Object

Represents a set of service endpoints that were considered equally suitable for a service invocation under a specific context.

Version:
$Id: $
Author:
dranatunga

Constructor Summary
EndpointSelection()
           
 
Method Summary
abstract  java.util.Iterator getAllEndpoints()
          Gets all endpoints represented by this selection.
abstract  EndpointComputation getComputation()
          Gets the computation used to arrive at this set of endpoints.
 Policy getFullPolicy()
          Gets the policy used to arrive at this endpoint selection.
abstract  Endpoint getOneEndpoint(Context context)
          Gets one of the active endpoints from the set of endpoints this represents.
abstract  Endpoint getOneEndpoint(Context context, SelectionStrategy strategy)
          Deprecated. As engine-core is removed, this method should be replaced with one that also takes an IndirectAddressResolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndpointSelection

public EndpointSelection()
Method Detail

getFullPolicy

public Policy getFullPolicy()
Gets the policy used to arrive at this endpoint selection.

Returns:
the policy; null if a policy was not used.

getComputation

public abstract EndpointComputation getComputation()
Gets the computation used to arrive at this set of endpoints.


getOneEndpoint

public abstract Endpoint getOneEndpoint(Context context)
                                 throws EndpointNotFoundException
Gets one of the active endpoints from the set of endpoints this represents. This delegates to getOneEndpoint(Context, SelectionStrategy) with the default strategy that considers endpoints' HOO and status based availability. Note that this operation has side-effects on the context. Specifically, the Policy to be propagated can be injected by the EndpointSelection.

Parameters:
context - the context under which the endpoints' states are determined.
Returns:
non-null endpoint.
Throws:
EndpointNotFoundException

getOneEndpoint

public abstract Endpoint getOneEndpoint(Context context,
                                        SelectionStrategy strategy)
                                 throws EndpointNotFoundException
Deprecated. As engine-core is removed, this method should be replaced with one that also takes an IndirectAddressResolver

Gets one of the active endpoints from the set of endpoints this represents. The choice is usually based on some meaningful scheme, for example round-robin. In the current implementation, the time of invocation indicated is used. The strategy supplied is used to further filter endpoints before the final choice is made. Note that this operation has side-effects on the context. Specifically, the Policy to be propagated can be injected by the EndpointSelection.

Parameters:
context - the context under which the endpoints' states are determined.
Returns:
non-null endpoint.
Throws:
EndpointNotFoundException

getAllEndpoints

public abstract java.util.Iterator getAllEndpoints()
Gets all endpoints represented by this selection. Note that this spans all endpoints, not just the available ones.

Returns:
an iterator over all the endpoints in this selection


Copyright © 2002-2009 IBM. All Rights Reserved.