public interface ClientObjectHandler
Recommendations to be followed when implementing ClientObjectHandler
ClientData
class, which can be retrieved
using handler.getClientData() method.
Ex:
package dateserver;
import java.net.*;
import java.io.*;
import java.util.Date;
import org.quickserver.net.server.*;
public class ObjectHandler implements ClientObjectHandler {
public void handleObject(ClientHandler handler, Object command)
throws SocketTimeoutException, IOException {
handler.sendSystemMsg("Got Object : " + command.toString());
handler.setDataMode(DataMode.STRING);
}
}
Modifier and Type | Method and Description |
---|---|
void |
handleObject(ClientHandler handler,
java.lang.Object command)
Method called every time client sends an Object.
|
void handleObject(ClientHandler handler, java.lang.Object command) throws java.net.SocketTimeoutException, java.io.IOException
java.net.SocketTimeoutException
- if socket times outjava.io.IOException
- if io error in socketCopyright © 2003-2014 QuickServer.org