com.jpeterson.x10
Class NullGatewayQueue

java.lang.Object
  |
  +--com.jpeterson.x10.GatewayQueue
        |
        +--com.jpeterson.x10.NullGatewayQueue

public class NullGatewayQueue
extends GatewayQueue

The NullGatewayQueue implements a null queue. This means that the put method directly calls the dispatcher to dispatch the message. This type of handling is useful for embedded type of applications that do not require their event notification to be synchronized with other events.


Fields inherited from class com.jpeterson.x10.GatewayQueue
dispatcher
 
Constructor Summary
NullGatewayQueue(ControlEventDispatcher dispatcher)
          Create a new gateway queue for processing control messages.
 
Method Summary
 void post(ControlEvent event)
          Put an event on the queue for subsequent processing by the dispatcher.
 
Methods inherited from class com.jpeterson.x10.GatewayQueue
getDispatcher, setDispatcher
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullGatewayQueue

public NullGatewayQueue(ControlEventDispatcher dispatcher)
Create a new gateway queue for processing control messages.
Parameters:
dispatcher - ControlEventDispatcher that will dispatch the control event.
Method Detail

post

public void post(ControlEvent event)
Put an event on the queue for subsequent processing by the dispatcher. This method directly calls dispatchControlEvent() on the dispatcher. Because it directly calls the dispatcher on the current thread, there is no decoupling or synchronization performed.
Overrides:
post in class GatewayQueue
Parameters:
event - ControlEvent to be placed on the queue for subsequent processing.