org.opensaml.ws.message.handler
Class BaseHandlerChainAwareMessageEncoder

java.lang.Object
  extended by org.opensaml.ws.message.encoder.BaseMessageEncoder
      extended by org.opensaml.ws.message.handler.BaseHandlerChainAwareMessageEncoder
All Implemented Interfaces:
MessageEncoder, HandlerChainAware
Direct Known Subclasses:
SOAP11Encoder

public abstract class BaseHandlerChainAwareMessageEncoder
extends BaseMessageEncoder
implements HandlerChainAware

Base class for message encoders which are capable of processing the message context's outbound HandlerChain.


Constructor Summary
BaseHandlerChainAwareMessageEncoder()
           
 
Method Summary
protected  void doEncode(MessageContext messageContext)
          Encodes the outbound message onto the outbound transport.
protected abstract  void encodeToTransport(MessageContext messageContext)
          Encode the message context to the transport.
protected  void invokeHandlerChain(HandlerChain handlerChain, MessageContext messageContext)
          Invoke a handler chain on the specified message context.
protected abstract  void prepareMessageContext(MessageContext messageContext)
          Perform final binding-specific processing of message context and prepare it for encoding to the transport.
protected  void processOutboundHandlerChain(MessageContext messageContext)
          Process the outbound HandlerChain for the message context, if any.
 
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
providesMessageConfidentiality, providesMessageIntegrity
 

Constructor Detail

BaseHandlerChainAwareMessageEncoder

public BaseHandlerChainAwareMessageEncoder()
Method Detail

doEncode

protected void doEncode(MessageContext messageContext)
                 throws MessageEncodingException
Encodes the outbound message onto the outbound transport.

Specified by:
doEncode in class BaseMessageEncoder
Parameters:
messageContext - current message context
Throws:
MessageEncodingException - thrown if there is a problem encoding the message

prepareMessageContext

protected abstract void prepareMessageContext(MessageContext messageContext)
                                       throws 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:
MessageEncodingException - thrown if there is a problem preparing the message context for encoding

encodeToTransport

protected abstract void encodeToTransport(MessageContext messageContext)
                                   throws MessageEncodingException
Encode the message context to the transport.

Parameters:
messageContext - the message context to process
Throws:
MessageEncodingException - thrown if there is a problem encoding the message context to the transport

processOutboundHandlerChain

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

Parameters:
messageContext - the message context to process
Throws:
MessageEncodingException - thrown if a handler indicates a problem handling the message

invokeHandlerChain

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

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


Copyright © 2006-2013 Internet2. All Rights Reserved.