org.mule.umo.provider
Interface OutputHandler


public interface OutputHandler

The OutputHandler is a strategy class that is set on the StreamMessageAdapter to defer the writing of the message payload until there is a stream available to write it to.

See Also:
StreamMessageAdapter

Method Summary
 Map getHeaders(UMOEvent event)
          Used to obtain a set of headers that will be sent with this stream payload.
 void write(UMOEvent event, OutputStream out)
          Write the event payload to the stream.
 

Method Detail

write

public void write(UMOEvent event,
                  OutputStream out)
           throws IOException
Write the event payload to the stream. Depending on the underlying transport, attachements and message properties may be written to the stream here too.

Parameters:
event - the current event
out - the output stream to write to
Throws:
IOException

getHeaders

public Map getHeaders(UMOEvent event)
Used to obtain a set of headers that will be sent with this stream payload. Headers are typically set independently from a stream payload.

Parameters:
event - the current event
Returns:
a Map of headers or an empty map if there are no headers


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.