com.liferay.portal.kernel.messaging
Class DefaultMessageBus

java.lang.Object
  extended by com.liferay.portal.kernel.messaging.DefaultMessageBus
All Implemented Interfaces:
MessageBus

public class DefaultMessageBus
extends java.lang.Object
implements MessageBus

View Source

Author:
Michael C. Han

Constructor Summary
DefaultMessageBus()
           
 
Method Summary
 void addDestination(Destination destination)
           
 void addDestinationEventListener(DestinationEventListener listener)
           
 void destroy()
           
protected  void fireDestinationAddedEvent(Destination destination)
           
protected  void fireDestinationRemovedEvent(Destination destination)
           
 int getDestinationCount()
           
 java.util.Collection<java.lang.String> getDestinationNames()
           
 java.util.Collection<Destination> getDestinations()
           
 boolean hasDestination(java.lang.String destinationName)
           
 boolean hasMessageListener(java.lang.String destination)
           
 void registerMessageListener(java.lang.String destination, MessageListener listener)
           
 void removeDestination(java.lang.String destination)
           
 void removeDestinationEventListener(DestinationEventListener listener)
           
 void sendMessage(java.lang.String destination, Message message)
           
 void shutdown()
           
 void shutdown(boolean force)
           
 boolean unregisterMessageListener(java.lang.String destination, MessageListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMessageBus

public DefaultMessageBus()
Method Detail

addDestination

public void addDestination(Destination destination)
Specified by:
addDestination in interface MessageBus

addDestinationEventListener

public void addDestinationEventListener(DestinationEventListener listener)
Specified by:
addDestinationEventListener in interface MessageBus

destroy

public void destroy()

getDestinationCount

public int getDestinationCount()
Specified by:
getDestinationCount in interface MessageBus

getDestinationNames

public java.util.Collection<java.lang.String> getDestinationNames()
Specified by:
getDestinationNames in interface MessageBus

getDestinations

public java.util.Collection<Destination> getDestinations()
Specified by:
getDestinations in interface MessageBus

hasDestination

public boolean hasDestination(java.lang.String destinationName)
Specified by:
hasDestination in interface MessageBus

hasMessageListener

public boolean hasMessageListener(java.lang.String destination)
Specified by:
hasMessageListener in interface MessageBus

registerMessageListener

public void registerMessageListener(java.lang.String destination,
                                    MessageListener listener)
Specified by:
registerMessageListener in interface MessageBus

removeDestination

public void removeDestination(java.lang.String destination)
Specified by:
removeDestination in interface MessageBus

removeDestinationEventListener

public void removeDestinationEventListener(DestinationEventListener listener)
Specified by:
removeDestinationEventListener in interface MessageBus

sendMessage

public void sendMessage(java.lang.String destination,
                        Message message)
Specified by:
sendMessage in interface MessageBus

shutdown

public void shutdown()
Specified by:
shutdown in interface MessageBus

shutdown

public void shutdown(boolean force)
Specified by:
shutdown in interface MessageBus

unregisterMessageListener

public boolean unregisterMessageListener(java.lang.String destination,
                                         MessageListener listener)
Specified by:
unregisterMessageListener in interface MessageBus

fireDestinationAddedEvent

protected void fireDestinationAddedEvent(Destination destination)

fireDestinationRemovedEvent

protected void fireDestinationRemovedEvent(Destination destination)