|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sourceforge.jemm.comm.example.echo.EchoClient
public class EchoClient
A simple test client for sending echo messages to an echo server.
| Field Summary | |
|---|---|
protected static org.apache.log4j.Logger |
LOG
|
| Constructor Summary | |
|---|---|
EchoClient(ClientConnectionFactory connFactory)
|
|
EchoClient(java.lang.String hostname,
int port)
Creates an EchoClient with the given parameters. |
|
| Method Summary | |
|---|---|
void |
asyncEchoReply(java.lang.String reply)
Asynchronous server->client echo message. |
void |
close()
Close the echo client/server connection. |
void |
sendAsyncEcho(java.lang.String message)
Send an echo message asynchronously. |
java.lang.String |
sendEcho(java.lang.String message)
Send an message to the echo server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger LOG
| Constructor Detail |
|---|
public EchoClient(java.lang.String hostname,
int port)
throws ConnectionException
hostname - The target echo server host name.port - The target echo server port.
IOException - On connection error.
ConnectionException
public EchoClient(ClientConnectionFactory connFactory)
throws ConnectionException
ConnectionException| Method Detail |
|---|
public java.lang.String sendEcho(java.lang.String message)
message - The message to send to the echo server
public void sendAsyncEcho(java.lang.String message)
message - The message to send.public void asyncEchoReply(java.lang.String reply)
EchoClientIF
asyncEchoReply in interface EchoClientIFreply - The reply given by the server.public void close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||