org.opensaml.saml2.binding.encoding
Class HandlerChainAwareHTTPSOAP11Encoder

java.lang.Object
  extended by org.opensaml.ws.message.encoder.BaseMessageEncoder
      extended by org.opensaml.saml2.binding.encoding.BaseSAML2MessageEncoder
          extended by org.opensaml.saml2.binding.encoding.HandlerChainAwareHTTPSOAP11Encoder
All Implemented Interfaces:
SAMLMessageEncoder, org.opensaml.ws.message.encoder.MessageEncoder, org.opensaml.ws.message.handler.HandlerChainAware

public class HandlerChainAwareHTTPSOAP11Encoder
extends BaseSAML2MessageEncoder
implements org.opensaml.ws.message.handler.HandlerChainAware


Constructor Summary
HandlerChainAwareHTTPSOAP11Encoder()
          Constructor.
 
Method Summary
protected  void doEncode(org.opensaml.ws.message.MessageContext messageContext)
          
protected  void encodeToTransport(org.opensaml.ws.message.MessageContext messageContext)
          Encode the message context to the transport.
 String getBindingURI()
          Gets the SAML binding URI supported by this encoder.
protected  void invokeHandlerChain(org.opensaml.ws.message.handler.HandlerChain handlerChain, org.opensaml.ws.message.MessageContext messageContext)
          Invoke a handler chain on the specified message context.
 boolean isNotConfidential()
          Returns confidentiality override flag.
protected  void prepareMessageContext(org.opensaml.ws.message.MessageContext messageContext)
          Perform final binding-specific processing of message context and prepare it for encoding to the transport.
protected  void preprocessTransport(org.opensaml.ws.message.MessageContext messageContext)
           This implementation performs the following actions on the context's HTTPOutTransport: Adds the HTTP header: "Cache-control: no-cache, no-store" Adds the HTTP header: "Pragma: no-cache" Sets the character encoding to: "UTF-8" Sets the content type to: "text/xml" Sets the SOAPAction HTTP header
protected  void processOutboundHandlerChain(org.opensaml.ws.message.MessageContext messageContext)
          Process the outbound HandlerChain for the message context, if any.
 boolean providesMessageConfidentiality(org.opensaml.ws.message.MessageContext messageContext)
          
 boolean providesMessageIntegrity(org.opensaml.ws.message.MessageContext messageContext)
          
 void setNotConfidential(boolean flag)
          Sets confidentiality override flag.
 
Methods inherited from class org.opensaml.saml2.binding.encoding.BaseSAML2MessageEncoder
checkRelayState, getAllowedURLSchemes, getEndpointURL, setAllowedURLSchemes, setResponseDestination, signMessage
 
Methods inherited from class org.opensaml.ws.message.encoder.BaseMessageEncoder
encode, logEncodedMessage, marshallMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensaml.ws.message.encoder.MessageEncoder
encode
 

Constructor Detail

HandlerChainAwareHTTPSOAP11Encoder

public HandlerChainAwareHTTPSOAP11Encoder()
Constructor.

Method Detail

isNotConfidential

public boolean isNotConfidential()
Returns confidentiality override flag.

Returns:
true iff the encoder cannot provide confidentiality

setNotConfidential

public void setNotConfidential(boolean flag)
Sets confidentiality override flag.

Parameters:
flag - override flag

getBindingURI

public String getBindingURI()
Gets the SAML binding URI supported by this encoder.

Specified by:
getBindingURI in interface SAMLMessageEncoder
Returns:
SAML binding URI supported by this encoder

providesMessageConfidentiality

public boolean providesMessageConfidentiality(org.opensaml.ws.message.MessageContext messageContext)
                                       throws org.opensaml.ws.message.encoder.MessageEncodingException

Specified by:
providesMessageConfidentiality in interface org.opensaml.ws.message.encoder.MessageEncoder
Throws:
org.opensaml.ws.message.encoder.MessageEncodingException

providesMessageIntegrity

public boolean providesMessageIntegrity(org.opensaml.ws.message.MessageContext messageContext)
                                 throws org.opensaml.ws.message.encoder.MessageEncodingException

Specified by:
providesMessageIntegrity in interface org.opensaml.ws.message.encoder.MessageEncoder
Throws:
org.opensaml.ws.message.encoder.MessageEncodingException

doEncode

protected void doEncode(org.opensaml.ws.message.MessageContext messageContext)
                 throws org.opensaml.ws.message.encoder.MessageEncodingException

Specified by:
doEncode in class org.opensaml.ws.message.encoder.BaseMessageEncoder
Throws:
org.opensaml.ws.message.encoder.MessageEncodingException

prepareMessageContext

protected void prepareMessageContext(org.opensaml.ws.message.MessageContext messageContext)
                              throws org.opensaml.ws.message.encoder.MessageEncodingException
Perform final binding-specific processing of message context and prepare it for encoding to the transport.

This should include constructing and populating all binding-specific structure and data that needs to be reflected by the message context's properties.

This method is called prior to processOutboundHandlerChain(MessageContext).

Parameters:
messageContext - the message context to process
Throws:
org.opensaml.ws.message.encoder.MessageEncodingException - thrown if there is a problem preparing the message context for encoding

encodeToTransport

protected void encodeToTransport(org.opensaml.ws.message.MessageContext messageContext)
                          throws org.opensaml.ws.message.encoder.MessageEncodingException
Encode the message context to the transport.

Parameters:
messageContext - the message context to process
Throws:
org.opensaml.ws.message.encoder.MessageEncodingException - thrown if there is a problem encoding the message context to the transport

preprocessTransport

protected void preprocessTransport(org.opensaml.ws.message.MessageContext messageContext)
                            throws org.opensaml.ws.message.encoder.MessageEncodingException

This implementation performs the following actions on the context's HTTPOutTransport:

  1. Adds the HTTP header: "Cache-control: no-cache, no-store"
  2. Adds the HTTP header: "Pragma: no-cache"
  3. Sets the character encoding to: "UTF-8"
  4. Sets the content type to: "text/xml"
  5. Sets the SOAPAction HTTP header

Parameters:
messageContext - the current message context being processed
Throws:
org.opensaml.ws.message.encoder.MessageEncodingException - thrown if there is a problem preprocessing the transport

processOutboundHandlerChain

protected void processOutboundHandlerChain(org.opensaml.ws.message.MessageContext messageContext)
                                    throws org.opensaml.ws.message.encoder.MessageEncodingException
Process the outbound HandlerChain for the message context, if any.

Parameters:
messageContext - the message context to process
Throws:
org.opensaml.ws.message.encoder.MessageEncodingException - thrown if a handler indicates a problem handling the message

invokeHandlerChain

protected void invokeHandlerChain(org.opensaml.ws.message.handler.HandlerChain handlerChain,
                                  org.opensaml.ws.message.MessageContext messageContext)
                           throws org.opensaml.ws.message.handler.HandlerException
Invoke a handler chain on the specified message context.

Parameters:
handlerChain - the handle chain to invoke
messageContext - the message context to process
Throws:
org.opensaml.ws.message.handler.HandlerException - if handler chain encountered a problem handling the message context


Copyright © 2006-2013 Internet2. All Rights Reserved.