Overview  Package   Class  Tree  Index 

be.lassi.lanbox
Class LanboxEngine

java.lang.Object
  extended by be.lassi.lanbox.LanboxEngine
All Implemented Interfaces:
ChannelChangeProcessor

public class LanboxEngine
extends java.lang.Object
implements ChannelChangeProcessor

Coordinates the communication to the lanbox. Spawns a 'forever' loop in which lanbox commands are sent to the lanbox and the response from the lanbox is interpreted.

Commands can be sent as a result of:


Constructor Summary
LanboxEngine(ShowContext context)
          Constructs a new engine.
 
Method Summary
 void change(int layerId, ChannelChange change)
          Adds a channel change to the channel change queue.
 void change(int layerId, java.util.List<ChannelChange> changes)
          Adds channel changes to the channel change queue.
 void close()
           
 void execute(Command command)
          Puts a Command on the command queue for execution.
 void execute(java.util.List<Command> commands)
           
 void executeAndWait(Command command)
           
 CommandLogQueue getCommandLogQueue()
          Gets the queue on which the lanbox commands are written after they have been executed on the lanbox.
 int getWaitingCommandsCount()
           
 void setCommandProcessor(CommandProcessor processor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LanboxEngine

public LanboxEngine(ShowContext context)
Constructs a new engine.

Parameters:
context - the show context
Method Detail

change

public void change(int layerId,
                   ChannelChange change)
Adds a channel change to the channel change queue.

Specified by:
change in interface ChannelChangeProcessor
change - the channel change to be added

change

public void change(int layerId,
                   java.util.List<ChannelChange> changes)
Adds channel changes to the channel change queue.

Parameters:
changes - the channel changes to be added

close

public void close()

execute

public void execute(Command command)
Puts a Command on the command queue for execution. If the execution thread is in a wait state, it will be notified that it has some more processing to do.

Parameters:
command - the command to be executed.

execute

public void execute(java.util.List<Command> commands)

executeAndWait

public void executeAndWait(Command command)

getCommandLogQueue

public CommandLogQueue getCommandLogQueue()
Gets the queue on which the lanbox commands are written after they have been executed on the lanbox.

Returns:
the command log queue

getWaitingCommandsCount

public int getWaitingCommandsCount()

setCommandProcessor

public void setCommandProcessor(CommandProcessor processor)

Overview  Package   Class  Tree  Index 
Lighting Assistant 1.2