|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mule.transport.http.issues.NoTransformFunctionalTestComponent
public class NoTransformFunctionalTestComponent
FunctionalTestComponent
is a service that can be used by
functional tests. This service accepts an EventCallback that can be used to
assert the state of the current event.
FunctionalTestNotification
via Mule for every message received.
Tests can register with Mule to receive these events by implementing
FunctionalTestNotificationListener
.
EventCallback
,
FunctionalTestNotification
,
FunctionalTestNotificationListener
Field Summary | |
---|---|
protected Log |
logger
|
static int |
STREAM_BUFFER_SIZE
|
static int |
STREAM_SAMPLE_SIZE
|
Constructor Summary | |
---|---|
NoTransformFunctionalTestComponent()
|
Method Summary | |
---|---|
EventCallback |
getEventCallback()
An event callback is called when a message is received by the service. |
Object |
getReturnMessage()
Often you will may want to return a fixed message payload to simulate and external system call. |
boolean |
isAppendComponentName()
This will cause the service to append the compoent name to the end of the message returned from this service. |
boolean |
isThrowException()
Sometimes you will want the service to always throw an exception, if this is the case you can set the 'throwException' property to true. |
Object |
onCall(MuleEventContext context)
|
Object |
onReceive(Object data)
Deprecated. Not sure why we have this duplicate method here. Need to investigate... |
static String |
received(String contents)
Append " Received" to contents. |
void |
setAppendComponentName(boolean appendComponentName)
This will cause the service to append the compoent name to the end of the message returned from this service. |
void |
setEventCallback(EventCallback eventCallback)
An event callback is called when a message is received by the service. |
void |
setReturnMessage(Object returnMessage)
Often you will may want to return a fixed message payload to simulate and external system call. |
void |
setThrowException(boolean throwException)
Sometimes you will want the service to always throw an exception, if this is the case you can set the 'throwException' property to true. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient Log logger
public static final int STREAM_SAMPLE_SIZE
public static final int STREAM_BUFFER_SIZE
Constructor Detail |
---|
public NoTransformFunctionalTestComponent()
Method Detail |
---|
public Object onCall(MuleEventContext context) throws Exception
onCall
in interface Callable
Exception
public static String received(String contents)
contents
-
public Object onReceive(Object data) throws Exception
data
- the event data received
Exception
public EventCallback getEventCallback()
FunctionalTestNotificationListener
with Mule and this
will deleiver a FunctionalTestNotification
for every message received by this service
FunctionalTestNotification
,
FunctionalTestNotificationListener
public void setEventCallback(EventCallback eventCallback)
FunctionalTestNotificationListener
with Mule and this
will deleiver a FunctionalTestNotification
for every message received by this service
eventCallback
- the callback to call when a message is receivedFunctionalTestNotification
,
FunctionalTestNotificationListener
public Object getReturnMessage()
public void setReturnMessage(Object returnMessage)
returnMessage
- the message payload to always return from this service instancepublic boolean isThrowException()
returnMessage
property is set and is of type
java.lang.Exception, that exception will be thrown.public void setThrowException(boolean throwException)
throwException
- true if an exception should always be thrown from this instance.
If the returnMessage
property is set and is of type
java.lang.Exception, that exception will be thrown.public boolean isAppendComponentName()
public void setAppendComponentName(boolean appendComponentName)
appendComponentName
- true if the service name will be appended to the return message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |