org.opensaml.common.binding.encoding.impl
Class AbstractHTTPMessageEncoder

java.lang.Object
  extended by org.opensaml.common.binding.encoding.impl.AbstractMessageEncoder<javax.servlet.http.HttpServletResponse>
      extended by org.opensaml.common.binding.encoding.impl.AbstractHTTPMessageEncoder
All Implemented Interfaces:
HTTPMessageEncoder, MessageEncoder<javax.servlet.http.HttpServletResponse>
Direct Known Subclasses:
AbstractSAML2HTTPMessageEncoder, AbstractSOAPHTTPEncoder, HTTPPostEncoder

public abstract class AbstractHTTPMessageEncoder
extends AbstractMessageEncoder<javax.servlet.http.HttpServletResponse>
implements HTTPMessageEncoder

Base class handling boilerplate code for HTTP message encoders.


Constructor Summary
AbstractHTTPMessageEncoder()
           
 
Method Summary
protected  java.lang.String getBase64EncodedMessage()
          Gets the SAML message as a base64, no line break, string.
protected  java.lang.String getEncodeRelayState()
          Gets the relay state in a URL-encoded form.
 java.lang.String getRelayState()
          Gets the relay state.
protected  void initializeResponse()
          Adds cache control and pragma headers that are meant to disable caching.
 void setRelayState(java.lang.String state)
          Sets the relay state.
 
Methods inherited from class org.opensaml.common.binding.encoding.impl.AbstractMessageEncoder
getIssuer, getMetadataProvider, getRelyingParty, getRelyingPartyEndpoint, getRelyingPartyRole, getResponse, getSamlMessage, getSigningCredential, marshallMessage, setIssuer, setMetadataProvider, setRelyingParty, setRelyingPartyEndpoint, setRelyingPartyRole, setResponse, setSamlMessage, setSigningCredential
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensaml.common.binding.encoding.MessageEncoder
encode, getBindingURI, getIssuer, getMetadataProvider, getRelyingParty, getRelyingPartyEndpoint, getRelyingPartyRole, getResponse, getSamlMessage, getSigningCredential, setIssuer, setMetadataProvider, setRelyingParty, setRelyingPartyEndpoint, setRelyingPartyRole, setResponse, setSamlMessage, setSigningCredential
 

Constructor Detail

AbstractHTTPMessageEncoder

public AbstractHTTPMessageEncoder()
Method Detail

getRelayState

public java.lang.String getRelayState()
Gets the relay state.

Specified by:
getRelayState in interface HTTPMessageEncoder
Returns:
the relay state

setRelayState

public void setRelayState(java.lang.String state)
Sets the relay state.

Specified by:
setRelayState in interface HTTPMessageEncoder
Parameters:
state - the relay state

initializeResponse

protected void initializeResponse()
Adds cache control and pragma headers that are meant to disable caching.


getEncodeRelayState

protected java.lang.String getEncodeRelayState()
                                        throws BindingException
Gets the relay state in a URL-encoded form.

Returns:
the URL-encoded relay state
Throws:
BindingException - thrown if there is a problem encoding the relay state

getBase64EncodedMessage

protected java.lang.String getBase64EncodedMessage()
                                            throws BindingException
Gets the SAML message as a base64, no line break, string.

Returns:
base64 encoded message
Throws:
BindingException - thrown if there is a problem encoding the message