Interface FusekiModule

All Superinterfaces:
FusekiActionCycle, FusekiBuildCycle, FusekiStartStop
All Known Subinterfaces:
FusekiAutoModule

public interface FusekiModule extends FusekiBuildCycle, FusekiStartStop, FusekiActionCycle
Module interface for Fuseki.

A module is additional code, usually in a separate jar, but it can be part of the application code. Calls are made to each module at certain points in the lifecycle of a Fuseki server.

A module must provide a no-argument constructor if it is to be loaded automatically.

When a server is being built: *

At server start-up:
  • Method Details

    • name

      String name()
      Description copied from interface: FusekiBuildCycle
      Display name to identify this module.
      Specified by:
      name in interface FusekiBuildCycle
    • prepare

      default void prepare(FusekiServer.Builder serverBuilder, Set<String> datasetNames, org.apache.jena.rdf.model.Model configModel)
      Description copied from interface: FusekiBuildCycle
      Called at the start of "build" step. The builder has been set according to the configuration of API calls and parsing configuration files. No build actions have been carried out yet. The module can make further FusekiServer.FusekiServer.Builder calls. The "configModel" parameter is set if a configuration file was used otherwise it is null.

      This is the main point for customization of server.

      It can add and modify the data services being built, and also add servlets and servlet filters.

      Specified by:
      prepare in interface FusekiBuildCycle
      Parameters:
      serverBuilder - The FusekiServer.Builder
      datasetNames - The names of DataServices configured by API calls and configuration file.
    • configured

      default void configured(FusekiServer.Builder serverBuilder, org.apache.jena.fuseki.server.DataAccessPointRegistry dapRegistry, org.apache.jena.rdf.model.Model configModel)
      Description copied from interface: FusekiBuildCycle
      Called after the DataAccessPointRegistry has been built.

      The default implementation is to call FusekiBuildCycle.configDataAccessPoint(DataAccessPoint, Model) for each DataAccessPoint.

          dapRegistry.accessPoints().forEach(accessPoint->configDataAccessPoint(accessPoint, configModel));
       
      Specified by:
      configured in interface FusekiBuildCycle
    • configDataAccessPoint

      default void configDataAccessPoint(org.apache.jena.fuseki.server.DataAccessPoint dap, org.apache.jena.rdf.model.Model configModel)
      This method is called for each DataAccessPoint by the default implementation of FusekiBuildCycle.configured(org.apache.jena.fuseki.main.FusekiServer.Builder, org.apache.jena.fuseki.server.DataAccessPointRegistry, org.apache.jena.rdf.model.Model) after the new servers DataAccessPointRegistry has been built.
      Specified by:
      configDataAccessPoint in interface FusekiBuildCycle
    • server

      default void server(FusekiServer server)
      Called when the server is built at the point where it is returned from the Fuseki server builder. The server has not yet been started.
      Specified by:
      server in interface FusekiBuildCycle
    • serverConfirmReload

      default boolean serverConfirmReload(FusekiServer server)
      Confirm or reject a request to reload.

      Not all servers or server modules may be able to reload. This is reload of a live server that continued to execute while reload happens and which completes all outstanding requests at the time of the reload request.

      Return true if reload is possible. If all modules return true the reload continues and FusekiBuildCycle.serverReload(org.apache.jena.fuseki.main.FusekiServer) will be called. If any module returns false, the reload is not performed.

      Specified by:
      serverConfirmReload in interface FusekiBuildCycle
    • serverReload

      default void serverReload(FusekiServer server)
      A running server has been asked to reload its configuration.

      Certain server feature will not change.

      • http and https connectiosn are preserved.
      • Port number
      • JVM process
      Specified by:
      serverReload in interface FusekiBuildCycle
    • serverBeforeStarting

      default void serverBeforeStarting(FusekiServer server)
      Server starting - called just before server.start happens.
      Specified by:
      serverBeforeStarting in interface FusekiStartStop
    • serverAfterStarting

      default void serverAfterStarting(FusekiServer server)
      Server started - called just after server.start happens, and before server .start() returns to the application.
      Specified by:
      serverAfterStarting in interface FusekiStartStop
    • serverStopped

      default void serverStopped(FusekiServer server)
      Server stopping. Do not rely on this called; do not rely on this to clear up external resources. Usually there is no stop phase and the JVM just exits or is killed externally.
      Specified by:
      serverStopped in interface FusekiStartStop