org.apache.uima.ducc.cli

Class DuccServiceApi

  • All Implemented Interfaces:
    org.apache.uima.ducc.cli.IUiOptions


    public class DuccServiceApi
    extends CliBase
    Handle registered services. This class is also the implementation of the DUCC service CLI which internally uses its API to implement itself. Details on the DUCC service CLI are found in theDUCC CLI reference.
    • Field Detail

      • registration_options

        org.apache.uima.ducc.cli.IUiOptions.UiOption[] registration_options
      • unregister_options

        org.apache.uima.ducc.cli.IUiOptions.UiOption[] unregister_options
      • start_options

        org.apache.uima.ducc.cli.IUiOptions.UiOption[] start_options
        Service start arguments.
      • stop_options

        org.apache.uima.ducc.cli.IUiOptions.UiOption[] stop_options
      • enable_options

        org.apache.uima.ducc.cli.IUiOptions.UiOption[] enable_options
      • disable_options

        org.apache.uima.ducc.cli.IUiOptions.UiOption[] disable_options
      • observe_options

        org.apache.uima.ducc.cli.IUiOptions.UiOption[] observe_options
      • ignore_options

        org.apache.uima.ducc.cli.IUiOptions.UiOption[] ignore_options
      • modify_options

        org.apache.uima.ducc.cli.IUiOptions.UiOption[] modify_options
      • query_options

        org.apache.uima.ducc.cli.IUiOptions.UiOption[] query_options
      • custom_only_options

        org.apache.uima.ducc.cli.IUiOptions.UiOption[] custom_only_options
      • uimaas_only_options

        org.apache.uima.ducc.cli.IUiOptions.UiOption[] uimaas_only_options
      • pinger_only_options

        org.apache.uima.ducc.cli.IUiOptions.UiOption[] pinger_only_options
    • Constructor Detail

    • Method Detail

      • getModifyOptions

        public org.apache.uima.ducc.cli.IUiOptions.UiOption[] getModifyOptions()
      • register

        public IServiceReply register(String[] args)
                               throws Exception
        The register API is used to register a service with the service manager.
        Parameters:
        args - String array of arguments as described in the Command Line Interface section of the DuccBook
        Returns:
        IServiceReply object with register status.
        Throws:
        Exception - if the request is invalid
      • unregister

        public IServiceReply unregister(String[] args)
                                 throws Exception
        The unregister API is used to unregister a service. The service manager will stop all instances and remove the service registration.
        Parameters:
        args - String array of arguments as described in the Command Line Interface section of the DuccBook
        Returns:
        IServiceReply object with unregister reply status.
        Throws:
        Exception - if the request is invalid
      • start

        public IServiceReply start(String[] args)
                            throws Exception
        The start API is used to start one or more instances of a registered service.
        Parameters:
        args - String array of arguments as described in the Command Line Interface section of the DuccBook
        Returns:
        IServiceReply object with start reply status.
        Throws:
        Exception - if the request is invalid
      • stop

        public IServiceReply stop(String[] args)
                           throws Exception
        The stop API is used to stop one or more service instances.
        Parameters:
        args - String array of arguments as described in the Command Line Interface section of the DuccBook
        Returns:
        IServiceReply object with stop status.
        Throws:
        Exception - if the request is invalid
      • modify

        public IServiceReply modify(String[] args)
                             throws Exception
        The service 'modify' command is used to change various aspects of a registered service without the need to reregister it.
        Parameters:
        args - String array of arguments as described in the Command Line Interface section of the DuccBook
        Returns:
        IServiceReply object with modify status.
        Throws:
        Exception - if the request is invalid
      • modifyX

        public IServiceReply modifyX(String[] args)
                              throws Exception
        The service 'modify' command is used to change various aspects of a registered service without the need to reregister it.
        Parameters:
        args - String array of arguments as described in the Command Line Interface section of the DuccBook
        Returns:
        IServiceReply object with modify status.
        Throws:
        Exception - if the request is invalid
      • query

        public IServiceReply query(String[] args)
                            throws Exception
        The query API is used to query the status of services known to the service manager.
        Parameters:
        args - String array of arguments as described in the Command Line Interface section of the DuccBook
        Returns:
        IServiceReply object with query results status.
        Throws:
        Exception - if the request is invalid
      • help

        void help()
      • execute

        public boolean execute()
        Description copied from class: CliBase
        All extenders must implement execute - this method does whatever processing on the input is needed and passes the CLI request to the internal DUCC processes.
        Specified by:
        execute in class CliBase
        Returns:
        Return true if execution works, and false otherwise.
      • format_reply

        static boolean format_reply(org.apache.uima.ducc.cli.IUiOptions.UiOption verb,
                                    IServiceReply reply)
      • Help

        static void Help()
      • getVerb

        static org.apache.uima.ducc.cli.IUiOptions.UiOption getVerb(String[] args)
      • main

        public static void main(String[] args)
        This is the main entrypoint, used by the executable jars and callable directly from the command line. If the invocation is successful, the process exits with return code 0. Otherwise, it exit with return code 1.
        Parameters:
        args - arguments as described in the DUCC CLI reference.

Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.