Interface IHostDelegate


  • public interface IHostDelegate
    Since:
    CS5
    • Method Detail

      • identifier

        java.lang.String identifier()
        Returns:
        a unique identifier
      • clientConnected

        void clientConnected​(INCommHost host,
                             IClient client)
        Called when a new client connects. If a single client opens multiple connections this method is only called once for the first connection.
        Parameters:
        host - - the INCommHost instance
        client - - ncomm client
      • execute

        void execute​(INCommHost host,
                     IRequest request)
              throws ServiceCallException,
                     NativeCommException
        Called to process a received ncomm request. The delegate can retrieve ncomm parameters from the passed request object and set results. If an error should be signaled to the ncomm client throw a ServiceCallException specifying an error code and message. Progress updates can be sent to the client using IRequest.setProgress(String, double). This method can also be used to allow the ncomm client to abort the request.
        Parameters:
        host - - the INCommHost instance
        request - - ncomm request object
        Throws:
        ServiceCallException - - if an error should be signaled to the ncomm client
        NativeCommException - - if an unexpected error occurs
      • clientDisconnected

        void clientDisconnected​(INCommHost host,
                                IClient client)
        Called when a client disconnects. If a single client opens multiple connections this method is only called once when all the client's connections are closed.
        Parameters:
        host - - the INCommHost instance
        client - - ncomm client
      • ncommError

        void ncommError​(INCommHost host,
                        java.lang.Throwable e)
        Called if a ncomm request handler encounters an exception. Useful for logging.
        Parameters:
        host - - the INCommHost instance
        e - - the error