public class MockHandler extends BaseHandler
| Constructor and Description |
|---|
MockHandler()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
MockHandler |
forwardInToFault()
Forward input to fault.
|
MockHandler |
forwardInToOut()
Forward input to output.
|
LinkedBlockingQueue<Exchange> |
getFaults()
Fault getter.
|
LinkedBlockingQueue<Exchange> |
getMessages()
Message getter.
|
long |
getWaitTimeout() |
void |
handleFault(Exchange exchange)
Called when a fault is generated while processing an exchange.
|
void |
handleMessage(Exchange exchange)
Called when a message is sent through an exchange.
|
MockHandler |
replyWithFault(Object content)
Reply with a fault message using the specified content.
|
MockHandler |
replyWithOut(Object content)
Reply with an out message using the specified content.
|
void |
setWaitTimeout(long waitTimeout) |
MockHandler |
waitForFaultMessage()
Wait for a number of messages.
|
MockHandler |
waitForOKMessage()
Wait for a message.
|
public long getWaitTimeout()
public void setWaitTimeout(long waitTimeout)
waitTimeout - wait timeoutpublic LinkedBlockingQueue<Exchange> getMessages()
public LinkedBlockingQueue<Exchange> getFaults()
public MockHandler forwardInToOut()
public MockHandler forwardInToFault()
public MockHandler replyWithOut(Object content)
content - content to reply withpublic MockHandler replyWithFault(Object content)
content - content to reply withpublic void handleMessage(Exchange exchange) throws HandlerException
ExchangeHandlerhandleMessage in interface ExchangeHandlerhandleMessage in class BaseHandlerexchange - the exchangeHandlerException - handler exceptionExchangeHandler.handleMessage(Exchange)public void handleFault(Exchange exchange)
ExchangeHandlerhandleFault in interface ExchangeHandlerhandleFault in class BaseHandlerexchange - the exchangeExchangeHandler.handleFault(Exchange)public MockHandler waitForOKMessage()
public MockHandler waitForFaultMessage()
Copyright © 2013–2017 JBoss by Red Hat. All rights reserved.