org.opensaml.ws.message.decoder
Class BaseMessageDecoder

java.lang.Object
  extended by org.opensaml.ws.message.decoder.BaseMessageDecoder
All Implemented Interfaces:
MessageDecoder

public abstract class BaseMessageDecoder
extends java.lang.Object
implements MessageDecoder

Base class for message decoders.


Constructor Summary
BaseMessageDecoder()
          Constructor.
BaseMessageDecoder(org.opensaml.xml.parse.ParserPool pool)
          Constructor.
 
Method Summary
 void decode(MessageContext messageContext)
          Decodes a message in a binding specific manner.
protected abstract  void doDecode(MessageContext messageContext)
          Decodes a message, updating the message context.
protected  org.opensaml.xml.parse.ParserPool getParserPool()
          Gets the parser pool used to deserialize incomming messages.
protected  void setParserPool(org.opensaml.xml.parse.ParserPool pool)
          Sets the parser pool used to deserialize incomming messages.
protected  org.opensaml.xml.XMLObject unmarshallMessage(java.io.InputStream messageStream)
          Helper method that deserializes and unmarshalls the message from the given stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseMessageDecoder

public BaseMessageDecoder()
Constructor.


BaseMessageDecoder

public BaseMessageDecoder(org.opensaml.xml.parse.ParserPool pool)
Constructor.

Parameters:
pool - parser pool used to deserialize messages
Method Detail

decode

public void decode(MessageContext messageContext)
            throws MessageDecodingException,
                   org.opensaml.xml.security.SecurityException
Decodes a message in a binding specific manner.

Specified by:
decode in interface MessageDecoder
Parameters:
messageContext - current message context
Throws:
MessageDecodingException - thrown if the message can not be decoded
org.opensaml.xml.security.SecurityException - thrown if the decoded message does not meet the required security constraints

doDecode

protected abstract void doDecode(MessageContext messageContext)
                          throws MessageDecodingException
Decodes a message, updating the message context. Security policy evaluation is handled outside this method.

Parameters:
messageContext - current message context
Throws:
MessageDecodingException - thrown if there is a problem decoding the message

getParserPool

protected org.opensaml.xml.parse.ParserPool getParserPool()
Gets the parser pool used to deserialize incomming messages.

Returns:
parser pool used to deserialize incomming messages

setParserPool

protected void setParserPool(org.opensaml.xml.parse.ParserPool pool)
Sets the parser pool used to deserialize incomming messages.

Parameters:
pool - parser pool used to deserialize incomming messages

unmarshallMessage

protected org.opensaml.xml.XMLObject unmarshallMessage(java.io.InputStream messageStream)
                                                throws MessageDecodingException
Helper method that deserializes and unmarshalls the message from the given stream.

Parameters:
messageStream - input stream containing the message
Returns:
the inbound message
Throws:
MessageDecodingException - thrown if there is a problem deserializing and unmarshalling the message


Copyright © 2006-2009 Internet2. All Rights Reserved.