jtge.engine.io
Class Output

java.lang.Object
  extended byjtge.engine.io.Output
All Implemented Interfaces:
IConsumer, IOutput

public class Output
extends java.lang.Object
implements IOutput

Handles the output logics.

It acts as the abstraction in the bridge pattern.

Version:
$Revision: 1.10 $ $Date: 2005/09/10 11:26:47 $
Author:
Mathieu Champlon

Constructor Summary
Output(IDisconnectionObserver observer, IOutputImp output)
          Create an output.
 
Method Summary
 void close()
          Close the output.

This method must be callable from a thread while another one consumes the command.

 void handle(ICommand command)
          Handle a command.
 boolean isClosed()
          Check whether the output is closed or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Output

public Output(IDisconnectionObserver observer,
              IOutputImp output)
Create an output.

Parameters:
observer - the observer
output - the output implementation
Method Detail

handle

public final void handle(ICommand command)
Handle a command.

Specified by:
handle in interface IConsumer
Parameters:
command - the command to handle

close

public final void close()
Close the output.

This method must be callable from a thread while another one consumes the command.

Specified by:
close in interface IOutput

isClosed

public final boolean isClosed()
Check whether the output is closed or not.

Specified by:
isClosed in interface IOutput
Returns:
current close status.


Copyright © 2003-2005 . All Rights Reserved.