rero.dcc
Class Chat
java.lang.Object
rero.dcc.ProtocolDCC
rero.dcc.Chat
- All Implemented Interfaces:
- ClientStateListener
public class Chat
- extends ProtocolDCC
- implements ClientStateListener
Field Summary |
protected java.io.BufferedReader |
input
|
protected java.io.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(java.lang.String _nickname)
|
Method Summary |
void |
fireError(java.lang.String description)
|
void |
fireEvent(java.lang.String event,
java.lang.String description)
|
java.lang.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(java.lang.String property,
java.lang.String value)
when the property gets changed you will be notified! |
void |
run()
|
void |
sendln(java.lang.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 |
input
protected java.io.BufferedReader input
output
protected java.io.PrintStream output
Chat
public Chat(java.lang.String _nickname)
propertyChanged
public void propertyChanged(java.lang.String property,
java.lang.String value)
- Description copied from interface:
ClientStateListener
- when the property gets changed you will be notified!
- Specified by:
propertyChanged
in interface ClientStateListener
getNickname
public java.lang.String getNickname()
- returns the nickname of who we are having a *chat* with
- Overrides:
getNickname
in class ProtocolDCC
sendln
public void sendln(java.lang.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(java.lang.String event,
java.lang.String description)
fireError
public void fireError(java.lang.String description)
- Specified by:
fireError
in class ProtocolDCC