irc
Class ListenerGroup

java.lang.Object
  |
  +--irc.ListenerGroup

public class ListenerGroup
extends java.lang.Object

Handles a group of listeners.


Constructor Summary
ListenerGroup()
          Create a new ListenerGroup.
 
Method Summary
 void addListener(java.lang.Object listener)
          Add a listener to the group.
 void removeListener(java.lang.Object listener)
          Remove a listener from the group.
 java.lang.Object sendEvent(java.lang.String method)
          Send an event to all listeners in the group.
 java.lang.Object sendEvent(java.lang.String method, java.lang.Object param1)
          Send an event to all listeners in the group.
 java.lang.Object sendEvent(java.lang.String method, java.lang.Object[] params)
          Send an event to all listeners in the group.
 java.lang.Object sendEvent(java.lang.String method, java.lang.Object param1, java.lang.Object param2)
          Send an event to all listeners in the group.
 java.lang.Object sendEvent(java.lang.String method, java.lang.Object param1, java.lang.Object param2, java.lang.Object param3)
          Send an event to all listeners in the group.
 void sendEventAsync(java.lang.String method, java.lang.Object[] params)
          Send an event to all listeners in the group, but asynchronously.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListenerGroup

public ListenerGroup()
Create a new ListenerGroup.

Method Detail

addListener

public void addListener(java.lang.Object listener)
Add a listener to the group.

Parameters:
listener - listener to add.

removeListener

public void removeListener(java.lang.Object listener)
Remove a listener from the group.

Parameters:
listener - listener to remove.

sendEvent

public java.lang.Object sendEvent(java.lang.String method,
                                  java.lang.Object[] params)
Send an event to all listeners in the group.

Parameters:
method - method to call on each listener.
params - parameters to pass to the called method.
Returns:
a result from any called listener.

sendEventAsync

public void sendEventAsync(java.lang.String method,
                           java.lang.Object[] params)
Send an event to all listeners in the group, but asynchronously. Any return result is discared.

Parameters:
method - method to call on each listener.
params - parameters to pass to the called method.

sendEvent

public java.lang.Object sendEvent(java.lang.String method)
Send an event to all listeners in the group.

Parameters:
method - method to call on each listener.
Returns:
a result from any called listener.

sendEvent

public java.lang.Object sendEvent(java.lang.String method,
                                  java.lang.Object param1)
Send an event to all listeners in the group.

Parameters:
method - method to call on each listener.
param1 - first parameter to pass to the called method.
Returns:
a result from any called listener.

sendEvent

public java.lang.Object sendEvent(java.lang.String method,
                                  java.lang.Object param1,
                                  java.lang.Object param2)
Send an event to all listeners in the group.

Parameters:
method - method to call on each listener.
param1 - first parameter to pass to the called method.
param2 - second parameter to pass to the called method.
Returns:
a result from any called listener.

sendEvent

public java.lang.Object sendEvent(java.lang.String method,
                                  java.lang.Object param1,
                                  java.lang.Object param2,
                                  java.lang.Object param3)
Send an event to all listeners in the group.

Parameters:
method - method to call on each listener.
param1 - first parameter to pass to the called method.
param2 - second parameter to pass to the called method.
param3 - third parameter to pass to the called method.
Returns:
a result from any called listener.