Package org.opensaml.messaging.pipeline
Class BasicMessagePipeline
- java.lang.Object
-
- org.opensaml.messaging.pipeline.BasicMessagePipeline
-
- All Implemented Interfaces:
MessagePipeline
- Direct Known Subclasses:
BasicHttpClientMessagePipeline,BasicHttpServletMessagePipeline
public class BasicMessagePipeline extends Object implements MessagePipeline
Basic implementation ofMessagePipeline.
-
-
Field Summary
Fields Modifier and Type Field Description private MessageDecoderdecoderMessage decoder.private MessageEncoderencoderMessage encoder.private MessageHandlerinboundHandlerInbound message handler.private MessageHandleroutboundPayloadHandlerOutbound payload message handler.private MessageHandleroutboundTransportHandlerOutbound transport message handler.
-
Constructor Summary
Constructors Constructor Description BasicMessagePipeline(MessageEncoder newEncoder, MessageDecoder newDecoder)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageDecodergetDecoder()Get the message decoder instance.MessageEncodergetEncoder()Get the message encoder instance.MessageHandlergetInboundMessageHandler()Get the (optional) inbound message handler instance.MessageHandlergetOutboundPayloadMessageHandler()Get the (optional) outbound payload message handler instance.MessageHandlergetOutboundTransportMessageHandler()Get the (optional) outbound transport message handler instance.protected voidsetDecoder(MessageDecoder newDecoder)Set the message decoder instance.protected voidsetEncoder(MessageEncoder newEncoder)Set the message encoder instance.voidsetInboundHandler(MessageHandler handler)Set the inbound message handler.voidsetOutboundPayloadHandler(MessageHandler handler)Set the outbound payload message handler.voidsetOutboundTransportHandler(MessageHandler handler)Set the outbound transport message handler.
-
-
-
Field Detail
-
encoder
private MessageEncoder encoder
Message encoder.
-
decoder
private MessageDecoder decoder
Message decoder.
-
outboundPayloadHandler
private MessageHandler outboundPayloadHandler
Outbound payload message handler.
-
outboundTransportHandler
private MessageHandler outboundTransportHandler
Outbound transport message handler.
-
inboundHandler
private MessageHandler inboundHandler
Inbound message handler.
-
-
Constructor Detail
-
BasicMessagePipeline
public BasicMessagePipeline(@Nonnull MessageEncoder newEncoder, @Nonnull MessageDecoder newDecoder)Constructor.- Parameters:
newEncoder- the message encoder instancenewDecoder- the message decoder instance
-
-
Method Detail
-
getEncoder
public MessageEncoder getEncoder()
Get the message encoder instance.- Specified by:
getEncoderin interfaceMessagePipeline- Returns:
- the message encoder
-
setEncoder
protected void setEncoder(@Nonnull MessageEncoder newEncoder)Set the message encoder instance.- Parameters:
newEncoder- the new message encoder
-
getDecoder
public MessageDecoder getDecoder()
Get the message decoder instance.- Specified by:
getDecoderin interfaceMessagePipeline- Returns:
- the message decoder
-
setDecoder
protected void setDecoder(@Nonnull MessageDecoder newDecoder)Set the message decoder instance.- Parameters:
newDecoder- the new message decoder
-
getOutboundPayloadMessageHandler
public MessageHandler getOutboundPayloadMessageHandler()
Get the (optional) outbound payload message handler instance.This is the handler intended to be called on the outbound message context, prior to any message encoding.
- Specified by:
getOutboundPayloadMessageHandlerin interfaceMessagePipeline- Returns:
- the outbound message handler, may be null
-
setOutboundPayloadHandler
public void setOutboundPayloadHandler(@Nullable MessageHandler handler)Set the outbound payload message handler.- Parameters:
handler- the new handler
-
getOutboundTransportMessageHandler
public MessageHandler getOutboundTransportMessageHandler()
Get the (optional) outbound transport message handler instance.This is the handler intended to be called after
MessageEncoder.prepareContext(), but beforeMessageEncoder.encode().- Specified by:
getOutboundTransportMessageHandlerin interfaceMessagePipeline- Returns:
- the outbound message handler, may be null
-
setOutboundTransportHandler
public void setOutboundTransportHandler(MessageHandler handler)
Set the outbound transport message handler.- Parameters:
handler- the new handler
-
getInboundMessageHandler
public MessageHandler getInboundMessageHandler()
Get the (optional) inbound message handler instance.- Specified by:
getInboundMessageHandlerin interfaceMessagePipeline- Returns:
- the inbound message handler, may be null
-
setInboundHandler
public void setInboundHandler(MessageHandler handler)
Set the inbound message handler.- Parameters:
handler- the new handler
-
-