jtge.engine.io
Class ChannelManager

java.lang.Object
  extended byjtge.engine.io.ChannelManager
All Implemented Interfaces:
IConnectionObserver, IDisconnectionObserver, ISessionManager

public class ChannelManager
extends java.lang.Object
implements ISessionManager

Maintains a link between inputs and outputs.

A channel is simply the association of an input and an output.

The manager closes both input and ouput when one of them is closed.

Version:
$Revision: 1.6 $ $Date: 2005/09/03 23:11:42 $
Author:
Mathieu Champlon

Constructor Summary
ChannelManager()
          Create a channel manager.
 
Method Summary
 void close()
          Close all inputs and outputs.
 void closed(IInput input)
          Notify the closing of an input.
 void closed(IOutput output)
          Notify the closing of an output.
 void opened(IInput input, IOutput output)
          Notify the opening of an input and/or output.
 void register(IChannelObserver observer)
          Register a channel observer.
 void register(IStatusObserver observer)
          Register a status observer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelManager

public ChannelManager()
Create a channel manager.

Method Detail

register

public final void register(IChannelObserver observer)
Register a channel observer.

Parameters:
observer - the observer

register

public final void register(IStatusObserver observer)
Register a status observer.

Parameters:
observer - the observer

opened

public final void opened(IInput input,
                         IOutput output)
Notify the opening of an input and/or output.

Specified by:
opened in interface IConnectionObserver
Parameters:
input - the input or null if none
output - the input or null if none

closed

public final void closed(IInput input)
Notify the closing of an input.

Specified by:
closed in interface IDisconnectionObserver
Parameters:
input - the closed input

closed

public final void closed(IOutput output)
Notify the closing of an output.

Specified by:
closed in interface IDisconnectionObserver
Parameters:
output - the closed output

close

public final void close()
Close all inputs and outputs.

Specified by:
close in interface ISessionManager


Copyright © 2003-2005 . All Rights Reserved.