|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.mule.providers.AbstractMessageAdapter
org.mule.providers.streaming.StreamMessageAdapter
Provides 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.
| Field Summary | |
protected OutputHandler |
handler
|
protected InputStream |
in
|
protected OutputStream |
out
|
protected InputStream |
response
|
| Fields inherited from class org.mule.providers.AbstractMessageAdapter |
attachments, encoding, exceptionPayload, id, logger, properties |
| Constructor Summary | |
StreamMessageAdapter(InputStream in)
|
|
StreamMessageAdapter(InputStream in,
OutputStream out)
|
|
StreamMessageAdapter(InputStream in,
OutputStream out,
OutputHandler handler)
|
|
StreamMessageAdapter(OutputHandler handler)
|
|
StreamMessageAdapter(OutputStream out,
OutputHandler handler)
|
|
| 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 |
Object |
getPayload()
This is an InputStream if triggered from an inbound event or response. |
byte[] |
getPayloadAsBytes()
Converts the message implementation into a String representation |
String |
getPayloadAsString(String encoding)
Converts the message implementation into a String representation |
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 class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected InputStream in
protected InputStream response
protected OutputStream out
protected OutputHandler handler
| Constructor Detail |
public StreamMessageAdapter(InputStream in)
public StreamMessageAdapter(InputStream in,
OutputStream out)
public StreamMessageAdapter(OutputHandler handler)
public StreamMessageAdapter(OutputStream out,
OutputHandler handler)
public StreamMessageAdapter(InputStream in,
OutputStream out,
OutputHandler handler)
| Method Detail |
public String getPayloadAsString(String encoding)
throws Exception
getPayloadAsString in interface UMOMessageAdapterencoding - The encoding to use when transforming the message (if
necessary). The parameter is used when converting from a byte array
Exception - Implementation may throw an endpoint specific exception
public byte[] getPayloadAsBytes()
throws Exception
getPayloadAsBytes in interface UMOMessageAdapterException - Implemetation may throw an endpoint specific exceptionpublic Object getPayload()
getPayload in interface UMOMessageAdapterpublic InputStream getInputStream()
UMOStreamMessageAdapter
getInputStream in interface UMOStreamMessageAdapterpublic OutputStream getOutputStream()
UMOStreamMessageAdapter
getOutputStream in interface UMOStreamMessageAdapter
public void write(UMOEvent event)
throws IOException
UMOStreamMessageAdapter
write in interface UMOStreamMessageAdapterevent - the event to write to the stream
IOExceptionpublic OutputHandler getOutputHandler()
UMOStreamMessageAdapter
getOutputHandler in interface UMOStreamMessageAdapterpublic void setOutputHandler(OutputHandler handler)
UMOStreamMessageAdapter
setOutputHandler in interface UMOStreamMessageAdapterhandler - the handler used to write to the streampublic void release()
release in interface UMOStreamMessageAdapter
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||