org.springframework.integration.stream
Class ByteStreamWritingMessageHandler
java.lang.Object
org.springframework.integration.stream.ByteStreamWritingMessageHandler
- All Implemented Interfaces:
- MessageHandler
public class ByteStreamWritingMessageHandler
- extends Object
- implements MessageHandler
A MessageHandler
that writes a byte array to an OutputStream
.
- Author:
- Mark Fisher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteStreamWritingMessageHandler
public ByteStreamWritingMessageHandler(OutputStream stream)
ByteStreamWritingMessageHandler
public ByteStreamWritingMessageHandler(OutputStream stream,
int bufferSize)
handleMessage
public void handleMessage(Message<?> message)
- Description copied from interface:
MessageHandler
- Handles the message if possible. If the handler cannot deal with the
message this will result in a
MessageRejectedException
e.g.
in case of a Selective Consumer. When a consumer tries to handle a
message, but fails to do so, a MessageHandlingException
is
thrown. In the last case it is recommended to treat the message as tainted
and go into an error scenario.
When the handling results in a message being sent failure to send that
message will result in a MessageDeliveryException
.
- Specified by:
handleMessage
in interface MessageHandler
- Parameters:
message
- the message to be handled
Copyright © 2010. All Rights Reserved.