edu.cuny.cat.comm
Class TelnetConnection

java.lang.Object
  extended by edu.cuny.cat.comm.SocketBasedConnection<TelnetMessage>
      extended by edu.cuny.cat.comm.TelnetConnection
All Implemented Interfaces:
Connection<TelnetMessage>, ProactiveConnection<TelnetMessage>

public class TelnetConnection
extends SocketBasedConnection<TelnetMessage>

A connection on the cat game server side to a telnet client.

Version:
$Revision: 1.2 $
Author:
Jinzhong Niu

Field Summary
 
Fields inherited from class edu.cuny.cat.comm.SocketBasedConnection
BUFFER_SIZE, readBuffer, skipLF, socketChannel
 
Constructor Summary
TelnetConnection(java.nio.channels.SocketChannel socketChannel)
           
 
Method Summary
 TelnetMessage getMessage()
          reads a Message from this connection.
 
Methods inherited from class edu.cuny.cat.comm.SocketBasedConnection
close, getLocalAddressInfo, getRemoteAddressInfo, initBuffer, isClosed, open, readLine, sendMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TelnetConnection

public TelnetConnection(java.nio.channels.SocketChannel socketChannel)
Method Detail

getMessage

public TelnetMessage getMessage()
                         throws CatException
Description copied from interface: ProactiveConnection
reads a Message from this connection. It blocks if no messages are available.

Returns:
message received over the connection.
Throws:
MessageException
CatException