Class BaseHttpClientRequestXMLMessageEncoder
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- org.opensaml.messaging.encoder.AbstractMessageEncoder
-
- org.opensaml.messaging.encoder.httpclient.AbstractHttpClientRequestMessageEncoder
-
- org.opensaml.messaging.encoder.httpclient.BaseHttpClientRequestXMLMessageEncoder
-
- All Implemented Interfaces:
net.shibboleth.utilities.java.support.component.Component,net.shibboleth.utilities.java.support.component.DestructableComponent,net.shibboleth.utilities.java.support.component.InitializableComponent,net.shibboleth.utilities.java.support.component.UnmodifiableComponent,HttpClientRequestMessageEncoder,MessageEncoder
public abstract class BaseHttpClientRequestXMLMessageEncoder extends AbstractHttpClientRequestMessageEncoder
Base class for message encoders which encode XML messages to HttpRequest.
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogClass logger.private org.slf4j.LoggerprotocolMessageLogUsed to log protocol messages.
-
Constructor Summary
Constructors Constructor Description BaseHttpClientRequestXMLMessageEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidencode()Encode theMessageContextsupplied viaMessageEncoder.setMessageContext(MessageContext)to the sink.protected ObjectgetMessageToLog()Get the XMLObject which will be logged as the protocol message.protected voidlogEncodedMessage()Log the encoded message to the protocol message logger.protected ElementmarshallMessage(org.opensaml.core.xml.XMLObject message)Helper method that marshalls the given message.-
Methods inherited from class org.opensaml.messaging.encoder.httpclient.AbstractHttpClientRequestMessageEncoder
doDestroy, doInitialize, getHttpRequest, setHttpRequest
-
Methods inherited from class org.opensaml.messaging.encoder.AbstractMessageEncoder
doEncode, getMessageContext, prepareContext, setMessageContext
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent
destroy, isDestroyed
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
Methods inherited from interface org.opensaml.messaging.encoder.MessageEncoder
prepareContext, setMessageContext
-
-
-
-
Method Detail
-
encode
public void encode() throws MessageEncodingExceptionEncode theMessageContextsupplied viaMessageEncoder.setMessageContext(MessageContext)to the sink.- Specified by:
encodein interfaceMessageEncoder- Overrides:
encodein classAbstractMessageEncoder- Throws:
MessageEncodingException- if there is a problem encoding the message context
-
logEncodedMessage
protected void logEncodedMessage()
Log the encoded message to the protocol message logger.
-
getMessageToLog
@Nullable protected Object getMessageToLog()
Get the XMLObject which will be logged as the protocol message.- Returns:
- the XMLObject message considered to be the protocol message for logging purposes
-
marshallMessage
@Nonnull protected Element marshallMessage(@Nonnull org.opensaml.core.xml.XMLObject message) throws MessageEncodingException
Helper method that marshalls the given message.- Parameters:
message- message the marshall and serialize- Returns:
- marshalled message
- Throws:
MessageEncodingException- thrown if the give message can not be marshalled into its DOM representation
-
-