rero.dcc
Class Chat

java.lang.Object
  extended byrero.dcc.ProtocolDCC
      extended byrero.dcc.Chat
All Implemented Interfaces:
ClientStateListener

public class Chat
extends ProtocolDCC
implements ClientStateListener


Field Summary
protected  BufferedReader input
           
protected  PrintStream output
           
 
Fields inherited from class rero.dcc.ProtocolDCC
DCC_CHAT, DCC_RECEIVE, DCC_SEND, DCC_TIMEOUT, dispatcher, eventData, idleTime, nickname, socket, startTime, state, STATE_CLOSED, STATE_OPEN, STATE_WAIT
 
Constructor Summary
Chat(String _nickname)
           
 
Method Summary
 void fireError(String description)
           
 void fireEvent(String event, String description)
           
 String getNickname()
          returns the nickname of who we are having a *chat* with
 int getTypeOfDCC()
          return the type of DCC based on a constant
 void propertyChanged(String property, String value)
          when the property gets changed you will be notified!
 void run()
           
 void sendln(String text)
          sends a message to the chat
 
Methods inherited from class rero.dcc.ProtocolDCC
announceFramework, close, getIdleTime, getLocalPort, getPort, getRemoteAddress, getStartTime, getState, getTotalTime, isConnected, setDCCSocket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

input

protected BufferedReader input

output

protected PrintStream output
Constructor Detail

Chat

public Chat(String _nickname)
Method Detail

propertyChanged

public void propertyChanged(String property,
                            String value)
Description copied from interface: ClientStateListener
when the property gets changed you will be notified!

Specified by:
propertyChanged in interface ClientStateListener

getNickname

public String getNickname()
returns the nickname of who we are having a *chat* with

Overrides:
getNickname in class ProtocolDCC

sendln

public void sendln(String text)
sends a message to the chat


getTypeOfDCC

public int getTypeOfDCC()
Description copied from class: ProtocolDCC
return the type of DCC based on a constant

Specified by:
getTypeOfDCC in class ProtocolDCC

run

public void run()
Specified by:
run in class ProtocolDCC

fireEvent

public void fireEvent(String event,
                      String description)

fireError

public void fireError(String description)
Specified by:
fireError in class ProtocolDCC