OpenSAML-J 2.4.1-redhat-3

org.opensaml.common.binding
Class BasicEndpointSelector

java.lang.Object
  extended by org.opensaml.common.binding.AbstractEndpointSelector
      extended by org.opensaml.common.binding.BasicEndpointSelector
Direct Known Subclasses:
AuthnResponseEndpointSelector

public class BasicEndpointSelector
extends AbstractEndpointSelector

This endpoint selector retrieves all the endpoints for a given role. A first filter pass removes those endpoints that use bindings which are not supported by the issuer. If the remaining endpoints are not IndexedEndpoints the first endpoint in the list is returned. If the remaining endpoints are IndexedEndpoints the first endpoint with the isDefault attribute set to true is returned, if no isDefault attribute is set to true the first endpoint to omit this attribute is returned, and if all the endpoints have the isDefault attribute set to false then the first endpoint in the list is returned. Prior to selecting the endpoint the following fields must have had values set: entity role, endpoint type, issuer supported bindings. While this algorithm with work for selecting the endpoint for responses to AuthnRequests the SAML specification does stipulate additional endpoint selection criteria and as such the use of an endpoint selector specifically meant to handler this situation should be used, for example: AuthnResponseEndpointSelector.


Constructor Summary
BasicEndpointSelector()
           
 
Method Summary
protected  List<? extends Endpoint> filterEndpointsByProtocolBinding(List<? extends Endpoint> endpoints)
          Filters the list of possible endpoints by supported outbound bindings.
 Endpoint selectEndpoint()
          Selects the endpoint to which messages should be sent.
protected  Endpoint selectIndexedEndpoint(List<IndexedEndpoint> endpoints)
          Selects an appropriate endpoint from a list of indexed endpoints.
protected  Endpoint selectNonIndexedEndpoint(List<Endpoint> endpoints)
          Selects an appropriate endpoint from a list of non-indexed endpoints.
 
Methods inherited from class org.opensaml.common.binding.AbstractEndpointSelector
getEndpointType, getEntityMetadata, getEntityRoleMetadata, getMetadataProvider, getSamlRequest, getSamlResponse, getSupportedIssuerBindings, setEndpointType, setEntityMetadata, setEntityRoleMetadata, setMetadataProvider, setSamlRequest, setSamlResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicEndpointSelector

public BasicEndpointSelector()
Method Detail

selectEndpoint

public Endpoint selectEndpoint()
Selects the endpoint to which messages should be sent.

Specified by:
selectEndpoint in class AbstractEndpointSelector
Returns:
endpoint to which messages should be sent, or null if no suitable endpoint can be determined

filterEndpointsByProtocolBinding

protected List<? extends Endpoint> filterEndpointsByProtocolBinding(List<? extends Endpoint> endpoints)
Filters the list of possible endpoints by supported outbound bindings.

Parameters:
endpoints - raw list of endpoints
Returns:
filtered endpoints

selectIndexedEndpoint

protected Endpoint selectIndexedEndpoint(List<IndexedEndpoint> endpoints)
Selects an appropriate endpoint from a list of indexed endpoints.

Parameters:
endpoints - list of indexed endpoints
Returns:
appropriate endpoint from a list of indexed endpoints or null

selectNonIndexedEndpoint

protected Endpoint selectNonIndexedEndpoint(List<Endpoint> endpoints)
Selects an appropriate endpoint from a list of non-indexed endpoints.

Parameters:
endpoints - list of non-indexed endpoints
Returns:
appropriate endpoint from a list of non-indexed endpoints or null

OpenSAML-J 2.4.1-redhat-3

Copyright © 2006-2012 Internet2. All Rights Reserved.