Example usage for com.liferay.portal.kernel.messaging SynchronousDestination SynchronousDestination

List of usage examples for com.liferay.portal.kernel.messaging SynchronousDestination SynchronousDestination

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.messaging SynchronousDestination SynchronousDestination.

Prototype

SynchronousDestination

Source Link

Usage

From source file:com.liferay.adaptive.media.document.library.thumbnails.internal.test.util.DestinationReplacer.java

License:Open Source License

public DestinationReplacer(String... destinationNames) {
    MessageBus messageBus = MessageBusUtil.getMessageBus();

    _destinations = Stream.of(destinationNames).map(messageBus::getDestination).collect(Collectors.toList());

    for (String destinationName : destinationNames) {
        SynchronousDestination synchronousDestination = new SynchronousDestination();

        synchronousDestination.setName(destinationName);

        messageBus.replace(synchronousDestination);
    }/*  ww w.j  av  a  2s . c o  m*/
}

From source file:com.liferay.adaptive.media.image.internal.test.util.DestinationReplacer.java

License:Open Source License

public DestinationReplacer(String destinationName) {
    MessageBus messageBus = MessageBusUtil.getMessageBus();

    _destination = messageBus.getDestination(destinationName);

    SynchronousDestination synchronousDestination = new SynchronousDestination();

    synchronousDestination.setName(destinationName);

    messageBus.replace(synchronousDestination);
}

From source file:com.liferay.mobile.camel.BaseTest.java

License:Open Source License

protected void addDestination() {
    if (messageBus.hasDestination(destinationName)) {
        return;/*from  ww  w.j  a  va2  s.c  om*/
    }

    SynchronousDestination destination = new SynchronousDestination();
    destination.setName(destinationName);
    messageBus.addDestination(destination);
}