Class DaemonService


  • public abstract class DaemonService
    extends java.lang.Object
    A service exposed by Daemon over anonymous git://.
    • Constructor Summary

      Constructors 
      Constructor Description
      DaemonService​(java.lang.String cmdName, java.lang.String cfgName)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void execute​(DaemonClient client, java.lang.String commandLine, java.util.Collection<java.lang.String> extraParameters)  
      (package private) abstract void execute​(DaemonClient client, Repository db, java.util.Collection<java.lang.String> extraParameters)  
      java.lang.String getCommandName()
      Get name of the command requested by clients.
      boolean handles​(java.lang.String commandLine)
      Determine if this service can handle the requested command.
      boolean isEnabled()
      Whether this service is enabled for invocation.
      private boolean isEnabledFor​(Repository db)  
      boolean isOverridable()
      Whether this service can be configured in the repository config file
      void setEnabled​(boolean on)
      Set if it is allowed to use this service
      void setOverridable​(boolean on)
      Whether to permit repositories to override this service's enabled state with the daemon.servicename config setting.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DaemonService

        DaemonService​(java.lang.String cmdName,
                      java.lang.String cfgName)
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Whether this service is enabled for invocation.
        Returns:
        whether this service is enabled for invocation.
      • setEnabled

        public void setEnabled​(boolean on)
        Set if it is allowed to use this service
        Parameters:
        on - true to allow this service to be used; false to deny it.
      • isOverridable

        public boolean isOverridable()
        Whether this service can be configured in the repository config file
        Returns:
        whether this service can be configured in the repository config file
      • setOverridable

        public void setOverridable​(boolean on)
        Whether to permit repositories to override this service's enabled state with the daemon.servicename config setting.
        Parameters:
        on - true to permit repositories to override this service's enabled state with the daemon.servicename config setting.
      • getCommandName

        public java.lang.String getCommandName()
        Get name of the command requested by clients.
        Returns:
        name of the command requested by clients.
      • handles

        public boolean handles​(java.lang.String commandLine)
        Determine if this service can handle the requested command.
        Parameters:
        commandLine - input line from the client.
        Returns:
        true if this command can accept the given command line.
      • isEnabledFor

        private boolean isEnabledFor​(Repository db)