QuickServer
v1.4.7

org.quickserver.net.qsadmin
Interface CommandPlugin


public interface CommandPlugin

This interface defines the methods that should be implemented by any class that wants to override default protocol of QsAdminServer or add new command specific to your application.

Recommendations to be followed when implementing ClientCommandHandler

If you need to access the QuickServer you can use the code given below
QuickServer myserver = (QuickServer) handler.getServer().getStoreObjects()[0];

Author:
Akshathkumar Shetty
See Also:
QSAdminServer.startServer()

Method Summary
 boolean handleCommand(ClientHandler handler, java.lang.String command)
          Method called every time client sends a command to QsAdminServer.
 

Method Detail

handleCommand

public boolean handleCommand(ClientHandler handler,
                             java.lang.String command)
                      throws java.net.SocketTimeoutException,
                             java.io.IOException
Method called every time client sends a command to QsAdminServer. Should be used to handle the command sent and send any requested data. If the comand is handled by the plugin it should return true else it should return false indicating qsadmin.CommandHandler to take any default action for the command. This method can be used to override default protocol of QsAdminServer or add new command specific to your application.

Throws:
java.net.SocketTimeoutException - if socket times out
java.io.IOException - if io error in socket

QuickServer
v1.4.7

Copyright © 2003-2006 QuickServer.org