org.sourceforge.jemm.comm.example.echo
Class EchoServer

java.lang.Object
  extended by org.sourceforge.jemm.comm.example.echo.EchoServer
All Implemented Interfaces:
EchoServerIF

public class EchoServer
extends java.lang.Object
implements EchoServerIF

EchoServer is a simple test server that receives EchoRequest messages from clients and responds with EchoReply messages.

Author:
Rory Graves

Constructor Summary
EchoServer(int port)
          Creates an instance of the echo server
EchoServer(ServerConnectionFactory connFactory)
           
 
Method Summary
 void asyncEcho(java.lang.String message)
          Asynchronous echo call.
 java.lang.String echo(java.lang.String message)
          A synchronous echo call, response is returned in return value.
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EchoServer

public EchoServer(int port)
Creates an instance of the echo server

Parameters:
port - The port to listen on.

EchoServer

public EchoServer(ServerConnectionFactory connFactory)
Method Detail

asyncEcho

public void asyncEcho(java.lang.String message)
Description copied from interface: EchoServerIF
Asynchronous echo call. Replies are received on the EchoClientIF.

Specified by:
asyncEcho in interface EchoServerIF
Parameters:
message - The message to be echoed

echo

public java.lang.String echo(java.lang.String message)
Description copied from interface: EchoServerIF
A synchronous echo call, response is returned in return value.

Specified by:
echo in interface EchoServerIF
Parameters:
message - The message to send to the server
Returns:
The response received from the server.

shutdown

public void shutdown()


Copyright © 2009. All Rights Reserved.