Class XMLObjectMessageEncoder
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.encoder.AbstractMessageEncoder
org.opensaml.messaging.encoder.servlet.AbstractHttpServletResponseMessageEncoder
org.opensaml.messaging.encoder.servlet.BaseHttpServletResponseXMLMessageEncoder
org.opensaml.saml.common.binding.impl.BaseSAMLHttpServletResponseEncoder
net.shibboleth.sp.saml.saml2.messaging.impl.XMLObjectMessageEncoder
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,UnmodifiableComponent,MessageEncoder,HttpServletResponseMessageEncoder
Simple
MessageEncoder for sending an XMLObject message directly into
servlet output stream.-
Field Summary
FieldsFields inherited from class org.opensaml.messaging.encoder.AbstractMessageEncoder
BASE_PROTOCOL_MESSAGE_LOGGER_CATEGORY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoEncode()protected HttpServletResponseThis implementation performs the following actions on the context'sHttpServletResponse: 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 as configuredvoidsetContentType(String type) Sets the Content-Type to output.Methods inherited from class org.opensaml.messaging.encoder.servlet.BaseHttpServletResponseXMLMessageEncoder
encode, marshallMessage, serializeMessageForLoggingMethods inherited from class org.opensaml.messaging.encoder.servlet.AbstractHttpServletResponseMessageEncoder
doInitialize, getHttpServletResponse, getHttpServletResponseSupplier, setHttpServletResponseSupplierMethods inherited from class org.opensaml.messaging.encoder.AbstractMessageEncoder
doDestroy, getMessageContext, getMessageToLog, getProtocolMessageLogger, getProtocolMessageLoggerSubCategory, logEncodedMessage, prepareContext, setMessageContext, setProtocolMessageLoggerSubCategoryMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.DestructableComponent
destroy, isDestroyedMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitializedMethods inherited from interface org.opensaml.messaging.encoder.MessageEncoder
prepareContext, setMessageContext
-
Field Details
-
contentType
Content type of output.
-
-
Constructor Details
-
XMLObjectMessageEncoder
public XMLObjectMessageEncoder()Constructor.
-
-
Method Details
-
setContentType
Sets the Content-Type to output.- Parameters:
type- content type
-
doEncode
- Specified by:
doEncodein classAbstractMessageEncoder- Throws:
MessageEncodingException
-
prepareHttpServletResponse
This implementation performs the following actions on the context'sHttpServletResponse:- 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 as configured
- Returns:
- the prepared response
- Throws:
MessageEncodingException- thrown if there is a problem preprocessing the transport
-