org.mule.tck.functional
Class FunctionalStreamingTestComponent

java.lang.Object
  extended byorg.mule.tck.functional.FunctionalStreamingTestComponent
All Implemented Interfaces:
StreamingService

public class FunctionalStreamingTestComponent
extends Object
implements StreamingService

A component that can be used by streaming functional tests. This component accepts an EventCallback that can be used to assert the state of the current event. To access the component 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

Field Summary
protected  Log logger
           
static int STREAM_BUFFER_SIZE
           
static int STREAM_SAMPLE_SIZE
           
 
Constructor Summary
FunctionalStreamingTestComponent()
           
 
Method Summary
 void call(InputStream in, OutputStream unused, UMOEventContext context)
          A service component that passes the inputStream and output stream for an event direcly to the service component.
 int getNumber()
           
 String getSummary()
           
 void setEventCallback(EventCallback eventCallback, long targetSize)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

FunctionalStreamingTestComponent

public FunctionalStreamingTestComponent()
Method Detail

setEventCallback

public void setEventCallback(EventCallback eventCallback,
                             long targetSize)

getSummary

public String getSummary()

getNumber

public int getNumber()

call

public void call(InputStream in,
                 OutputStream unused,
                 UMOEventContext context)
          throws Exception
Description copied from interface: StreamingService
A service component that passes the inputStream and output stream for an event direcly to the service component. Note that the InputStream will never be null, but the OutputStream can be null if the transport being used does not provide a response output stream and there is no outbound endpoint defined for this service.

Specified by:
call in interface StreamingService
Parameters:
in -
unused -
context -
Throws:
Exception

toString

public String toString()


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