org.mule.tck.functional
Class FunctionalStreamingTestComponent
java.lang.Object
org.mule.tck.functional.FunctionalStreamingTestComponent
- All Implemented Interfaces:
- Callable, EventListener
public class FunctionalStreamingTestComponent
- extends Object
- implements Callable
A service that can be used by streaming functional tests. This service accepts an
EventCallback that can be used to assert the state of the current event. To access the
service when embedded in an (XML) model, make sure that the descriptor sets the
singleton attribute true - see uses in TCP and FTP.
Note that although this implements the full StreamingService interface, nothing is
written to the output stream - this is intended as a final sink.
- See Also:
EventCallback
logger
protected transient Log logger
STREAM_SAMPLE_SIZE
public static final int STREAM_SAMPLE_SIZE
- See Also:
- Constant Field Values
STREAM_BUFFER_SIZE
public static final int STREAM_BUFFER_SIZE
- See Also:
- Constant Field Values
FunctionalStreamingTestComponent
public FunctionalStreamingTestComponent()
setEventCallback
public void setEventCallback(EventCallback eventCallback,
long targetSize)
getSummary
public String getSummary()
getNumber
public int getNumber()
onCall
public Object onCall(MuleEventContext context)
throws Exception
- Description copied from interface:
Callable
- Passes the event to the listener
- Specified by:
onCall
in interface Callable
- Parameters:
context
- the context of the current event being process
- Returns:
- Object this object can be anything. When the
LifecycleAdapter
for the service receives this
object it will first see if the Object is an MuleMessage
if not and the Object is not null a new message will be created using
the returned object as the payload. This new event will then get
published via the configured outbound router if-
- One has been configured for the component.
- the
setStopFurtherProcessing(true)
wasn't called
on the event context event.
- Throws:
Exception
- if the event fails to process properly. If exceptions aren't
handled by the implementation they will be handled by the
exceptionListener associated with the service
read
protected int read(InputStream in,
byte[] buffer)
throws IOException
- Throws:
IOException
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.