psdi.util

Interface ToolClientHandler

  • All Known Implementing Classes:
    DefaultToolClientHandler, MosWosToolClientHandler


    public interface ToolClientHandler
    The handler that knows how to read the parameters passed in through HTTP request, and how to dispatch the call to the server. If a command needs to connect to server and invoke a server operation through the ToolClientServlet, a class that implements this interface needs to be provided. The handler class name needs to be passed in to the servlet through a parameter when the request is issued.
    See Also:
    psdi.servlet.ToolClientServlet, psdi.util.ToolClient
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      java.lang.Object dispatchRequest(MXSession session, java.lang.String command, java.lang.Object[] params)
      Dispatch the command.
      java.lang.Object[] packageParam(java.lang.String command, java.lang.String[] args)
      Compose the parameter objects based on a set of command line parameters.
      java.lang.String processReturn(java.lang.String command, java.lang.Object retObject)
      Handle the return object of the call.
    • Method Detail

      • dispatchRequest

        java.lang.Object dispatchRequest(MXSession session,
                                         java.lang.String command,
                                         java.lang.Object[] params)
                                  throws MXException,
                                         java.rmi.RemoteException
        Dispatch the command. The command is an identifier to the type of request.
        Parameters:
        session -
        command -
        params -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • packageParam

        java.lang.Object[] packageParam(java.lang.String command,
                                        java.lang.String[] args)
        Compose the parameter objects based on a set of command line parameters. The return value will be the parameter objects that understood by dispatchRequest.
        Returns:
      • processReturn

        java.lang.String processReturn(java.lang.String command,
                                       java.lang.Object retObject)
        Handle the return object of the call. The returned string will be displayed if the request is made by the command line.
        Parameters:
        command -
        retObject -
        Returns: