org.jboss.soa.esb.services.security.auth
Class ExtractorUtil

java.lang.Object
  extended by org.jboss.soa.esb.services.security.auth.ExtractorUtil

public final class ExtractorUtil
extends java.lang.Object

Util class for operations common to security extractors.

Author:
Daniel Bevenius

Method Summary
static void addAuthRequestToMessage(AuthenticationRequest authRequest, Message message)
          This method will add the passed-in AuthenticationRequest to the Message context.
static
<T> AuthenticationRequest
extract(T payload, java.util.Set<SecurityInfoExtractor<T>> extractors)
          This method will try to extract security information from the passed-in payload of type T.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

extract

public static <T> AuthenticationRequest extract(T payload,
                                                java.util.Set<SecurityInfoExtractor<T>> extractors)
                                     throws ExtractionException
This method will try to extract security information from the passed-in payload of type T. The extractors will iterated over and given the chance to extract, the first one that is successful will have the AuthenticationRequest that it populated returned.

Type Parameters:
T - The type of the payload.
Parameters:
payload - The payload that will be of type T
extractors - The extractors to extract security information from.
Returns:
AuthenticationRequest A populated AuthenticationReqeust or null if no security information was extracted.
Throws:
ExtractionException

addAuthRequestToMessage

public static void addAuthRequestToMessage(AuthenticationRequest authRequest,
                                           Message message)
                                    throws SecurityServiceException
This method will add the passed-in AuthenticationRequest to the Message context.

Parameters:
authRequest - The AuthenticationRequest to add to the Message context
message - The ESB Message object instance.
Throws:
SecurityServiceException