Package org.eclipse.jgit.transport
Class DaemonService
java.lang.Object
org.eclipse.jgit.transport.DaemonService
A service exposed by
Daemon over anonymous
git://.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final Config.SectionParser<DaemonService.ServiceConfig>private booleanprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidexecute(DaemonClient client, String commandLine, Collection<String> extraParameters) (package private) abstract voidexecute(DaemonClient client, Repository db, Collection<String> extraParameters) Get name of the command requested by clients.booleanDetermine if this service can handle the requested command.booleanWhether this service is enabled for invocation.private booleanbooleanWhether this service can be configured in the repository config filevoidsetEnabled(boolean on) Set if it is allowed to use this servicevoidsetOverridable(boolean on) Whether to permit repositories to override this service's enabled state with thedaemon.servicenameconfig setting.
-
Field Details
-
command
-
configKey
-
enabled
private boolean enabled -
overridable
private boolean overridable
-
-
Constructor Details
-
DaemonService
-
-
Method Details
-
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-trueto allow this service to be used;falseto 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 thedaemon.servicenameconfig setting.- Parameters:
on-trueto permit repositories to override this service's enabled state with thedaemon.servicenameconfig setting.
-
getCommandName
Get name of the command requested by clients.- Returns:
- name of the command requested by clients.
-
handles
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.
-
execute
void execute(DaemonClient client, String commandLine, @Nullable Collection<String> extraParameters) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException -
isEnabledFor
-
execute
abstract void execute(DaemonClient client, Repository db, @Nullable Collection<String> extraParameters) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException
-