com.miginfocom.ashape.interaction
Class CompositeBroker

java.lang.Object
  extended by com.miginfocom.ashape.interaction.CompositeBroker
All Implemented Interfaces:
InteractionBroker

public class CompositeBroker
extends java.lang.Object
implements InteractionBroker

A InteractionBroker that aggregates other brokers and calls the in turn to execute commands.


Constructor Summary
CompositeBroker(InteractionBroker[] brokers)
          Constructor.
 
Method Summary
 InteractionBroker[] getBrokers()
          Returns the brokers sent into the constructor.
 void handleCommands(Interactor interactor, CommandSet cmdSet, java.awt.event.InputEvent e)
          Handles the intended commands.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeBroker

public CompositeBroker(InteractionBroker[] brokers)
Constructor.

Parameters:
brokers - The brokers to aggreagate. Array will be overtaken and will not be cloned. No null elements.
Method Detail

handleCommands

public void handleCommands(Interactor interactor,
                           CommandSet cmdSet,
                           java.awt.event.InputEvent e)
Description copied from interface: InteractionBroker
Handles the intended commands.

Specified by:
handleCommands in interface InteractionBroker
Parameters:
interactor - The source if the interaction. If not originater from an Interactor it can be set to null.
cmdSet - The commands. Up to the implementation to interpret. Not null.
e - The event that started the chain, if available. Can be null.

getBrokers

public InteractionBroker[] getBrokers()
Returns the brokers sent into the constructor.

Returns:
The brokers sent into the constructor.


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.