Interface FusekiServerArgsCustomiser

All Known Subinterfaces:
FusekiAutoModule, FusekiModule
All Known Implementing Classes:
FMod_Admin, FMod_BLANK, FMod_GraphAccessCtl, FMod_Prometheus, FMod_Shiro, FMod_UI

public interface FusekiServerArgsCustomiser
Interface to implement for extending the CLI argument parsing portion of a 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:

Following command like processing, server construction proceeds with the 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 Type
    Method
    Description
    default void
    serverArgsBuilder(FusekiServer.Builder serverBuilder, org.apache.jena.rdf.model.Model configModel)
    Called at the end of applying the ServerArgs to the builder.
    default void
    serverArgsModify(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 void
    serverArgsPrepare(org.apache.jena.cmd.CmdGeneral fusekiCmd, ServerArgs serverArgs)
    Called at the end command line argument processing.
  • Method Details

    • serverArgsModify

      default void serverArgsModify(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. This allows a Fuseki module to add custom arguments via CmdLineArgs.addArg(String, String) and CmdGeneral.addModule(org.apache.jena.cmd.ArgModuleGeneral).

      This method can throw CmdException to 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 arguments
      serverArgs - Intial setting before command line processing.
    • serverArgsPrepare

      default void serverArgsPrepare(org.apache.jena.cmd.CmdGeneral fusekiCmd, ServerArgs serverArgs)
      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 ServerArgs that 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 CmdException to indicate errors. This will cause a error message to be printed, without the stack trace. The server construction is aborted.

      Parameters:
      fusekiCmd - Fuseki Main
      serverArgs - 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 the ServerArgs to 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 CmdException to 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.