aigames.soccer.communication
Class ClientData

java.lang.Object
  extended byaigames.soccer.communication.ClientData

public class ClientData
extends java.lang.Object

Data associated with accepted client.

Version:
$Id: ClientData.java,v 1.4 2004/05/08 21:55:26 mwerla Exp $

Constructor Summary
ClientData(java.nio.channels.SocketChannel socket, UserId userId)
          Deafult constructor.
 
Method Summary
 void append(java.lang.String message)
          Appends a line to the client message buffer.
 void clearBuffer(int position)
          Clear processed part of the message buffer.
 java.lang.StringBuffer getBuffer()
          Getter for client message buffer.
 java.nio.channels.SocketChannel getSocket()
          Getter for socket channel.
 UserId getUserId()
          Gettero for user id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientData

public ClientData(java.nio.channels.SocketChannel socket,
                  UserId userId)
Deafult constructor.

Parameters:
socket - socket channel
userId - UserId object
Method Detail

append

public void append(java.lang.String message)
Appends a line to the client message buffer.

Parameters:
message - string from a socket

getBuffer

public java.lang.StringBuffer getBuffer()
Getter for client message buffer.

Returns:
message buffer

getSocket

public java.nio.channels.SocketChannel getSocket()
Getter for socket channel.

Returns:
socket channel

getUserId

public UserId getUserId()
Gettero for user id.

Returns:
UserId object

clearBuffer

public void clearBuffer(int position)
Clear processed part of the message buffer.

Parameters:
position - last processed byte of the buffer


Copyright © 2001-2004 MoMaT & MWe Team. All Rights Reserved.