Class ChatClientProtokoll

java.lang.Object
  extended by java.lang.Thread
      extended by ChatClientProtokoll
All Implemented Interfaces:
java.lang.Runnable

 class ChatClientProtokoll
extends java.lang.Thread

Protokoll eines Clients, zeigt Nachrichten vom Server an und schickt Nachrichten zum Server.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  java.net.Socket c
          Socket fuer Serververbindung
private  java.io.BufferedReader vomServer
          Eingabestrom vom Server
private  java.io.PrintWriter zumServer
          Ausgabestrom zum Server
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ChatClientProtokoll(java.net.Socket c)
          Konstruktor, baut Datenstroeme zum/vom Server auf.
 
Method Summary
 void action()
          Nutzereingaben, Eingabe und Versenden von Nachrichten.
protected  void release()
          Beendet ChatClient, meldet Abbruch dem Server, bricht Verbindung zum Server ab, bricht Programm ab.
 void run()
          Interaktion, liest und verarbeitet Nachrichten vom Server.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

c

private java.net.Socket c
Socket fuer Serververbindung


vomServer

private java.io.BufferedReader vomServer
Eingabestrom vom Server


zumServer

private java.io.PrintWriter zumServer
Ausgabestrom zum Server

Constructor Detail

ChatClientProtokoll

public ChatClientProtokoll(java.net.Socket c)
Konstruktor, baut Datenstroeme zum/vom Server auf.

Parameters:
c - Socket fuer Serververbindung
Method Detail

run

public void run()
Interaktion, liest und verarbeitet Nachrichten vom Server.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

action

public void action()
Nutzereingaben, Eingabe und Versenden von Nachrichten.


release

protected void release()
Beendet ChatClient, meldet Abbruch dem Server, bricht Verbindung zum Server ab, bricht Programm ab.