org.mule.umo.provider
Interface UMOStreamMessageAdapter

All Superinterfaces:
Serializable, UMOMessageAdapter
All Known Implementing Classes:
StreamMessageAdapter, TestConnector.DummyMessageAdapter

public interface UMOStreamMessageAdapter
extends UMOMessageAdapter

A stream message adapter rovides a generic base class for stream based message flows in Mule. This adapter represents the 3 flows of data that Mule identifies, namely inbound, outbound and response flows. These are represented by three streams on the adapter.


Method Summary
 InputStream getInputStream()
          Gets the input Stream associated with this event
 OutputHandler getOutputHandler()
          The Output handler is a callback that will handle the writing to an output Stream when the Stream is available
 OutputStream getOutputStream()
          Gets the output Stream associated with this event
 void release()
          The release method is called by Mule to notify this adapter that it is no longer needed.
 void setOutputHandler(OutputHandler handler)
          The Output handler is a callback that will handle the writing to an output Stream when the Stream is available
 void write(UMOEvent event)
          Writes the event to the current outputStream using the OutputHandler set on the StreamAdapter.
 
Methods inherited from interface org.mule.umo.provider.UMOMessageAdapter
addAttachment, addProperties, clearProperties, getAttachment, getAttachmentNames, getBooleanProperty, getCorrelationGroupSize, getCorrelationId, getCorrelationSequence, getDoubleProperty, getEncoding, getExceptionPayload, getIntProperty, getLongProperty, getPayload, getPayloadAsBytes, getPayloadAsString, getPayloadAsString, getProperty, getProperty, getPropertyNames, getReplyTo, getStringProperty, getUniqueId, removeAttachment, removeProperty, setBooleanProperty, setCorrelationGroupSize, setCorrelationId, setCorrelationSequence, setDoubleProperty, setEncoding, setExceptionPayload, setIntProperty, setLongProperty, setProperty, setReplyTo, setStringProperty
 

Method Detail

getInputStream

public InputStream getInputStream()
Gets the input Stream associated with this event

Returns:
the input Stream associated with this event

getOutputStream

public OutputStream getOutputStream()
Gets the output Stream associated with this event

Returns:
the output Stream associated with this event

write

public void write(UMOEvent event)
           throws IOException
Writes the event to the current outputStream using the OutputHandler set on the StreamAdapter.

Parameters:
event - the event to write to the stream
Throws:
IOException

getOutputHandler

public OutputHandler getOutputHandler()
The Output handler is a callback that will handle the writing to an output Stream when the Stream is available

Returns:
the handler used to write to the stream

setOutputHandler

public void setOutputHandler(OutputHandler handler)
The Output handler is a callback that will handle the writing to an output Stream when the Stream is available

Parameters:
handler - the handler used to write to the stream

release

public void release()
The release method is called by Mule to notify this adapter that it is no longer needed. This method can be used to release any resources that a custom StreamAdapter may have associated with it.



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