com.liferay.portal.kernel.messaging
Class MessageBusUtil
java.lang.Object
com.liferay.portal.kernel.messaging.MessageBusUtil
public class MessageBusUtil
- extends Object
Method Summary |
static void |
addDestination(Destination destination)
|
static Message |
createResponseMessage(Message requestMessage)
|
static Message |
createResponseMessage(Message requestMessage,
Object payload)
|
static MessageBusUtil |
getInstance()
|
static MessageBus |
getMessageBus()
|
static MessageSender |
getMessageSender()
|
static boolean |
hasMessageListener(String destination)
|
static void |
init(MessageBus messageBus,
MessageSender messageSender,
SynchronousMessageSender synchronousMessageSender)
|
static void |
registerMessageListener(String destinationName,
MessageListener messageListener)
|
static void |
removeDestination(String destinationName)
|
static void |
sendMessage(String destinationName,
Message message)
|
static void |
sendMessage(String destinationName,
Object payload)
|
static Object |
sendSynchronousMessage(String destinationName,
Message message)
|
static Object |
sendSynchronousMessage(String destinationName,
Message message,
long timeout)
|
static Object |
sendSynchronousMessage(String destinationName,
Object payload)
|
static Object |
sendSynchronousMessage(String destinationName,
Object payload,
long timeout)
|
static Object |
sendSynchronousMessage(String destinationName,
Object payload,
String responseDestinationName)
|
static Object |
sendSynchronousMessage(String destinationName,
Object payload,
String responseDestinationName,
long timeout)
|
static void |
shutdown()
|
static void |
shutdown(boolean force)
|
static boolean |
unregisterMessageListener(String destinationName,
MessageListener messageListener)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
addDestination
public static void addDestination(Destination destination)
createResponseMessage
public static Message createResponseMessage(Message requestMessage)
createResponseMessage
public static Message createResponseMessage(Message requestMessage,
Object payload)
getInstance
public static MessageBusUtil getInstance()
getMessageBus
public static MessageBus getMessageBus()
getMessageSender
public static MessageSender getMessageSender()
hasMessageListener
public static boolean hasMessageListener(String destination)
init
public static void init(MessageBus messageBus,
MessageSender messageSender,
SynchronousMessageSender synchronousMessageSender)
registerMessageListener
public static void registerMessageListener(String destinationName,
MessageListener messageListener)
removeDestination
public static void removeDestination(String destinationName)
sendMessage
public static void sendMessage(String destinationName,
Message message)
sendMessage
public static void sendMessage(String destinationName,
Object payload)
sendSynchronousMessage
public static Object sendSynchronousMessage(String destinationName,
Message message)
throws MessageBusException
- Throws:
MessageBusException
sendSynchronousMessage
public static Object sendSynchronousMessage(String destinationName,
Message message,
long timeout)
throws MessageBusException
- Throws:
MessageBusException
sendSynchronousMessage
public static Object sendSynchronousMessage(String destinationName,
Object payload)
throws MessageBusException
- Throws:
MessageBusException
sendSynchronousMessage
public static Object sendSynchronousMessage(String destinationName,
Object payload,
long timeout)
throws MessageBusException
- Throws:
MessageBusException
sendSynchronousMessage
public static Object sendSynchronousMessage(String destinationName,
Object payload,
String responseDestinationName)
throws MessageBusException
- Throws:
MessageBusException
sendSynchronousMessage
public static Object sendSynchronousMessage(String destinationName,
Object payload,
String responseDestinationName,
long timeout)
throws MessageBusException
- Throws:
MessageBusException
shutdown
public static void shutdown()
shutdown
public static void shutdown(boolean force)
unregisterMessageListener
public static boolean unregisterMessageListener(String destinationName,
MessageListener messageListener)