Package org.opensaml.profile.action.impl
Class DecodeMessageTest.MockMessageDecoder
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.decoder.AbstractMessageDecoder
org.opensaml.profile.action.impl.DecodeMessageTest.MockMessageDecoder
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,UnmodifiableComponent,MessageDecoder
- Enclosing class:
- DecodeMessageTest
Mock implementation of
MessageDecoder which either returns a
MessageContext with a mock message or throws a MessageDecodingException.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate MockMessageThe mock message to produce (optional).private booleanWhether aMessageDecodingExceptionshould be thrown bydoDecode().Fields inherited from class org.opensaml.messaging.decoder.AbstractMessageDecoder
BASE_PROTOCOL_MESSAGE_LOGGER_CATEGORY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoDecode()voidsetThrowException(boolean shouldThrowDecodeException) Sets whether aMessageDecodingExceptionshould be thrown bydoDecode().Methods inherited from class org.opensaml.messaging.decoder.AbstractMessageDecoder
decode, getMessageContext, getMessageToLog, getProtocolMessageLogger, getProtocolMessageLoggerSubCategory, logDecodedMessage, serializeMessageForLogging, setMessageContext, setProtocolMessageLoggerSubCategoryMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, 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, isInitialized
-
Field Details
-
throwException
private boolean throwExceptionWhether aMessageDecodingExceptionshould be thrown bydoDecode(). -
message
The mock message to produce (optional).
-
-
Constructor Details
-
MockMessageDecoder
Constructor.- Parameters:
mockMessage- the mock message to produce
-
-
Method Details
-
setThrowException
public void setThrowException(boolean shouldThrowDecodeException) Sets whether aMessageDecodingExceptionshould be thrown bydoDecode().- Parameters:
shouldThrowDecodeException- true if an exception should be thrown, false if not
-
doDecode
- Specified by:
doDecodein classAbstractMessageDecoder- Throws:
MessageDecodingException
-