Interface FusekiServerArgsCustomiser
- All Known Subinterfaces:
FusekiAutoModule,FusekiModule
- All Known Implementing Classes:
FMod_Admin,FMod_BLANK,FMod_GraphAccessCtl,FMod_Prometheus,FMod_Shiro,FMod_UI
FusekiServer.
Customisation code is registered by calling FusekiMain.addCustomiser(org.apache.jena.fuseki.main.sys.FusekiServerArgsCustomiser)
before invoking FusekiMain.build(java.lang.String...). This can be done from Java code, or
during FusekiAutoModule.start() for dynamically loaded code.
The customiser modifies the Fuseki arguments setup after the standard Fuseki main
arguments have been registered. The customiser is then called
after the standard arguments have been used to produce the ServerArgs.
The lifecycle for command line argument processing is:
-
Add customisers by calling
FusekiMain.addCustomiser(org.apache.jena.fuseki.main.sys.FusekiServerArgsCustomiser)fromFusekiAutoModule.start()or from Java application code. -
serverArgsModify(org.apache.jena.cmd.CmdGeneral, org.apache.jena.fuseki.main.cmds.ServerArgs)– Register or modify the argument setup to be used to parse the command line. -
serverArgsPrepare(org.apache.jena.cmd.CmdGeneral, org.apache.jena.fuseki.main.cmds.ServerArgs)– Called after parsing the command line and recoding the command line settings inServerArgs. Customisers can record argument values and flags. -
serverArgsBuilder(org.apache.jena.fuseki.main.FusekiServer.Builder, org.apache.jena.rdf.model.Model)– Called after theServerArgshave been used to construct a server builder.
FusekiBuildCycle,
the first step of which is FusekiBuildCycle.prepare(org.apache.jena.fuseki.main.FusekiServer.Builder, java.util.Set<java.lang.String>, org.apache.jena.rdf.model.Model).-
Method Summary
Modifier and TypeMethodDescriptiondefault voidserverArgsBuilder(FusekiServer.Builder serverBuilder, org.apache.jena.rdf.model.Model configModel) Called at the end of applying theServerArgsto the builder.default voidserverArgsModify(org.apache.jena.cmd.CmdGeneral fusekiCmd, ServerArgs serverArgs) Called after the standard Fuseki main arguments have been added and before argument processing of the command line.default voidserverArgsPrepare(org.apache.jena.cmd.CmdGeneral fusekiCmd, ServerArgs serverArgs) Called at the end command line argument processing.
-
Method Details
-
serverArgsModify
Called after the standard Fuseki main arguments have been added and before argument processing of the command line. This allows a Fuseki module to add custom arguments viaCmdLineArgs.addArg(String, String)andCmdGeneral.addModule(org.apache.jena.cmd.ArgModuleGeneral).This method can throw
CmdExceptionto indicate errors. This will cause a error message to be printed, without the stack trace. The server construction is aborted.- Parameters:
fusekiCmd- Fuseki Main command line argumentsserverArgs- Initial setting before command line processing.
-
serverArgsPrepare
Called at the end command line argument processing.This allows a Fuseki module to pull out custom arguments it has added and process them appropriately, including validating or modifying the
ServerArgsthat will be used to build the server. This method can set the set the dataset, in which case a command line dataset setup or configuration file server set up is not performed.This method can throw
CmdExceptionto indicate errors. This will cause a error message to be printed, without the stack trace. The server construction is aborted.- Parameters:
fusekiCmd- Fuseki MainserverArgs- Standard server argument settings, before building the server.
-
serverArgsBuilder
default void serverArgsBuilder(FusekiServer.Builder serverBuilder, org.apache.jena.rdf.model.Model configModel) Called at the end of applying theServerArgsto the builder.This step can do validation and argument processing dependent on the configuration model.
If there is a configuration model, this has been processed by the builder
If a command line dataset setup is being used, this is the dataset has been created.
This method can throw
CmdExceptionto indicate errors. This will cause a error message to be printed, without the stack trace. The server construction is aborted.- Parameters:
serverBuilder- The server builder.configModel- The configuration model; this may be null.
-