Module org.apache.jena.fuseki.main
Package org.apache.jena.fuseki.main.sys
Interface FusekiAutoModule
- All Superinterfaces:
 FusekiActionCycle,FusekiBuildCycle,FusekiLifecycle,FusekiModule,FusekiServerArgsCustomiser,FusekiStartStop,org.apache.jena.base.module.SubsystemLifecycle
- All Known Implementing Classes:
 FMod_BLANK
Module interface for Fuseki with loading via ServiceLoader from mixin jars.
 
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.
Automatically loaded Fuseki modules:
- start() -- called when the module is loaded and instantiated.
 - stop() -- modules finishes. This is unlikely to be called in practice and there is no guarantee of a clean shutdown.
 
- prepare(org.apache.jena.fuseki.main.FusekiServer.Builder, java.util.Set<java.lang.String>, org.apache.jena.rdf.model.Model)
      -- called at the beginning of the
     
FusekiServer.Builder build()step. This call can manipulate the server configuration. This is the usual operation for customizing a server. - configured(org.apache.jena.fuseki.main.FusekiServer.Builder, org.apache.jena.fuseki.server.DataAccessPointRegistry, org.apache.jena.rdf.model.Model) -- called after the DataAccessPoint registry has been built.
 - server(FusekiServer) -- called at the end of the "build" step before
     
FusekiServer.Builder build()returns. 
- serverBeforeStarting(FusekiServer) -- called before 
server.starthappens. - serverAfterStarting(FusekiServer) -- called after 
server.starthappens. - serverStopped(FusekiServer) -- call after 
server.stop, but only if a clean shutdown happens. Servers may simply exit without a shutdown phase. The JVM may exit or be killed without clean shutdown. Modules must not rely on a call toserverStoppedhappening. 
- 
Method Summary
Modifier and TypeMethodDescriptiondefault voidconfigDataAccessPoint(org.apache.jena.fuseki.server.DataAccessPoint dap, org.apache.jena.rdf.model.Model configModel) This method is called for eachDataAccessPointby the default implementation ofFusekiBuildCycle.configured(org.apache.jena.fuseki.main.FusekiServer.Builder, org.apache.jena.fuseki.server.DataAccessPointRegistry, org.apache.jena.rdf.model.Model)after the new server'sDataAccessPointRegistryhas been built.default voidconfigured(FusekiServer.Builder serverBuilder, org.apache.jena.fuseki.server.DataAccessPointRegistry dapRegistry, org.apache.jena.rdf.model.Model configModel) Called after theDataAccessPointRegistryhas been built.default intlevel()Level for ordering calling all loadedFusekiAutoModule.name()A display name to identify this module.default voidprepare(FusekiServer.Builder serverBuilder, Set<String> datasetNames, org.apache.jena.rdf.model.Model configModel) Called at the start of "build" step.default voidserver(FusekiServer server) Called when the server is built at the point where it is returned from theFuseki server builder.default voidserverAfterStarting(FusekiServer server) Server started - called just after server.start happens, and before server .start() returns to the application.default voidserverBeforeStarting(FusekiServer server) Server starting - called just before server.start happens.default voidserverStopped(FusekiServer server) Server stopping.default voidstart()default voidstop()Methods inherited from interface org.apache.jena.fuseki.main.sys.FusekiModule
serverConfirmReload, serverReloadMethods inherited from interface org.apache.jena.fuseki.main.sys.FusekiServerArgsCustomiser
serverArgsBuilder, serverArgsModify, serverArgsPrepare 
- 
Method Details
- 
name
String name()A display name to identify this module.This defaults to the Java simple class name of module.
- Specified by:
 namein interfaceFusekiBuildCycle- Specified by:
 namein interfaceFusekiModule
 - 
start
default void start()- Specified by:
 startin interfaceorg.apache.jena.base.module.SubsystemLifecycle
 - 
stop
default void stop()- Specified by:
 stopin interfaceorg.apache.jena.base.module.SubsystemLifecycle
 - 
level
default int level()Level for ordering calling all loadedFusekiAutoModule. Levels 0-999 are reserved and should not be used except by system FusekiAutoModule- Specified by:
 levelin interfaceorg.apache.jena.base.module.SubsystemLifecycle
 - 
prepare
default void prepare(FusekiServer.Builder serverBuilder, Set<String> datasetNames, org.apache.jena.rdf.model.Model configModel) 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.Buildercalls. 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:
 preparein interfaceFusekiBuildCycle- Specified by:
 preparein interfaceFusekiModule- Parameters:
 serverBuilder- The FusekiServer.BuilderdatasetNames- 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) Called after theDataAccessPointRegistryhas been built.The default implementation is to call
FusekiBuildCycle.configDataAccessPoint(DataAccessPoint, Model)for eachDataAccessPoint.dapRegistry.accessPoints().forEach(accessPoint->configDataAccessPoint(accessPoint, configModel));- Specified by:
 configuredin interfaceFusekiBuildCycle- Specified by:
 configuredin interfaceFusekiModule
 - 
configDataAccessPoint
default void configDataAccessPoint(org.apache.jena.fuseki.server.DataAccessPoint dap, org.apache.jena.rdf.model.Model configModel) This method is called for eachDataAccessPointby the default implementation ofFusekiBuildCycle.configured(org.apache.jena.fuseki.main.FusekiServer.Builder, org.apache.jena.fuseki.server.DataAccessPointRegistry, org.apache.jena.rdf.model.Model)after the new server'sDataAccessPointRegistryhas been built.- Specified by:
 configDataAccessPointin interfaceFusekiBuildCycle- Specified by:
 configDataAccessPointin interfaceFusekiModule
 - 
server
Called when the server is built at the point where it is returned from theFuseki server builder. The server has not yet been started.- Specified by:
 serverin interfaceFusekiBuildCycle- Specified by:
 serverin interfaceFusekiModule
 - 
serverBeforeStarting
Server starting - called just before server.start happens.- Specified by:
 serverBeforeStartingin interfaceFusekiModule- Specified by:
 serverBeforeStartingin interfaceFusekiStartStop
 - 
serverAfterStarting
Server started - called just after server.start happens, and before server .start() returns to the application.- Specified by:
 serverAfterStartingin interfaceFusekiModule- Specified by:
 serverAfterStartingin interfaceFusekiStartStop
 - 
serverStopped
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:
 serverStoppedin interfaceFusekiModule- Specified by:
 serverStoppedin interfaceFusekiStartStop
 
 -