org.openbandy.example.pingpong
Class PingPongService
java.lang.Object
org.openbandy.example.pingpong.PingPongService
- All Implemented Interfaces:
- ServerService
public class PingPongService
- extends java.lang.Object
- implements ServerService
TODO describe purpose and usage
(c) Copyright Philipp Bolliger 2007, ALL RIGHTS RESERVED.
- Version:
- 0.1
- Author:
- Philipp Bolliger (philipp@bolliger.name)
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PingPongService
public PingPongService()
getName
public java.lang.String getName()
- Specified by:
getName
in interface ServerService
- Returns:
- The name of the service.
getProtocol
public ServerProtocol getProtocol()
- Specified by:
getProtocol
in interface ServerService
- Returns:
- The corresponding BandyProtocol.
processMessage
public Message processMessage(Message message)
- Description copied from interface:
ServerService
- This method may be called for every message coming in
on
port
. It will process the message
according to its implementation. Eventually the service
can return a response message will be sent back to the
request issuer.
- Specified by:
processMessage
in interface ServerService
- Parameters:
message
- The Message that must be processed.
- Returns:
- The message that should be sent back or null otherwise.
getNewInstance
public ServerService getNewInstance()
- Specified by:
getNewInstance
in interface ServerService
- Returns:
- A new instance of this service.