com.jpeterson.x10.event
Interface Producer


public interface Producer

Producers fire events to AddressListeners and FunctionListeners. An example of a producer may be a software widget that represents a light switch. When the switch is turned on, the registered AddressListeners and FunctionListeners will be notified. For actual transmission of an X10Event through a gateway, it may be desirable to use the Transmitter interface.


Method Summary
 void addAddressListener(AddressListener listener)
          Add an AddressListener.
 void addFunctionListener(FunctionListener listener)
          Add a FunctionListener.
 void removeAddressListener(AddressListener listener)
          Remove the first instance of the specified listener from the register list of AddressListeners.
 void removeFunctionListener(FunctionListener listener)
          Remove the first instance of the specified listener from the register list of FunctionListeners.
 

Method Detail

addAddressListener

public void addAddressListener(AddressListener listener)
Add an AddressListener. This Producer will send all registered AddressListeners AddressEvents as they are produced by the Producer.
Parameters:
listener - Listener to add.

removeAddressListener

public void removeAddressListener(AddressListener listener)
Remove the first instance of the specified listener from the register list of AddressListeners.
Parameters:
listener - Listner to remove.

addFunctionListener

public void addFunctionListener(FunctionListener listener)
Add a FunctionListener. This Producer will send all registered FunctionListeners FunctionEvents as they are produced by the Producer.
Parameters:
listener - Listener to add.

removeFunctionListener

public void removeFunctionListener(FunctionListener listener)
Remove the first instance of the specified listener from the register list of FunctionListeners.
Parameters:
listener - Listner to remove.