Search in sources :

Example 1 with TerminateException

use of com.predic8.membrane.core.TerminateException in project service-proxy by membrane.

the class Exchange method block.

public void block(Message msg) throws TerminateException {
    try {
        log.debug("Message thread waits");
        msg.wait();
        log.debug("Message thread received notify");
        if (isForcedToStop())
            throw new TerminateException("Force the exchange to stop.");
    } catch (InterruptedException e1) {
        Thread.currentThread().interrupt();
    }
}
Also used : TerminateException(com.predic8.membrane.core.TerminateException)

Aggregations

TerminateException (com.predic8.membrane.core.TerminateException)1