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:
Component,DestructableComponent,InitializableComponent,UnmodifiableComponent,HttpClientRequestMessageEncoder,MessageEncoder
- Direct Known Subclasses:
HttpClientRequestSOAP11Encoder
public abstract class BaseHttpClientRequestXMLMessageEncoder
extends AbstractHttpClientRequestMessageEncoder
Base class for message encoders which encode XML messages to HttpRequest.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerClass logger.private org.slf4j.LoggerUsed to log protocol messages. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidencode()Encode theMessageContextsupplied viaMessageEncoder.setMessageContext(MessageContext)to the sink.protected ObjectGet the XMLObject which will be logged as the protocol message.protected voidLog the encoded message to the protocol message logger.protected ElementmarshallMessage(XMLObject message) Helper method that marshalls the given message.Methods inherited from class org.opensaml.messaging.encoder.httpclient.AbstractHttpClientRequestMessageEncoder
doDestroy, doInitialize, getHttpRequest, setHttpRequestMethods inherited from class org.opensaml.messaging.encoder.AbstractMessageEncoder
doEncode, getMessageContext, prepareContext, setMessageContextMethods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, 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.utilities.java.support.component.DestructableComponent
destroy, isDestroyedMethods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitializedMethods inherited from interface org.opensaml.messaging.encoder.MessageEncoder
prepareContext, setMessageContext
-
Field Details
-
protocolMessageLog
@Nonnull private org.slf4j.Logger protocolMessageLogUsed to log protocol messages. -
log
@Nonnull private final org.slf4j.Logger logClass logger.
-
-
Constructor Details
-
BaseHttpClientRequestXMLMessageEncoder
public BaseHttpClientRequestXMLMessageEncoder()
-
-
Method Details
-
encode
Encode 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
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 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
-