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

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

Introduction

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

Prototype

public void setName(String name) 

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);
    }/*from   w  w w  .j  a v a  2 s . co  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;/* w w w .  j  av  a2 s . c o  m*/
    }

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