|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.chat.InstantMessenger
this class is a subclass of Chat, also implementing Chatter interface. it is a one-to-one instant message style chat implementation.
Constructor Summary | |
InstantMessenger(java.net.Socket socket,
ChatManager manager,
ActivityCallback callback)
constructor for an incoming chat request |
|
InstantMessenger(java.lang.String host,
int port,
ChatManager manager,
ActivityCallback callback)
constructor for an outgoing chat request |
Method Summary | |
void |
blockHost(java.lang.String host)
|
java.lang.String |
getHost()
returns the host name to which the socket is connected |
java.lang.String |
getMessage()
|
int |
getPort()
returns the port to which the socket is connected |
void |
readHeader()
Reads the header information from the chat request. |
void |
send(java.lang.String message)
send a message accross the socket to the other host as with stop, this is alway safe to call, but it is recommended that the gui discourage the user from calling it when a connection is not yet established. |
void |
start()
starts the chatting |
void |
stop()
stop the chat, and close the connections this is always safe to call, but it is recommended that the gui try to encourage the user not to call this |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public InstantMessenger(java.net.Socket socket, ChatManager manager, ActivityCallback callback) throws java.io.IOException
public InstantMessenger(java.lang.String host, int port, ChatManager manager, ActivityCallback callback) throws java.io.IOException
Method Detail |
public void start()
public void stop()
stop
in interface Chatter
public void send(java.lang.String message)
send
in interface Chatter
public java.lang.String getHost()
getHost
in interface Chatter
public int getPort()
getPort
in interface Chatter
public java.lang.String getMessage()
getMessage
in interface Chatter
public void blockHost(java.lang.String host)
blockHost
in interface Chatter
public void readHeader() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |