This is a Fuseki server running with a pre-configured set of datasets and services.
 To create a embedded sever, use FusekiServer (make(int, java.lang.String, org.apache.jena.sparql.core.DatasetGraph) is a packaging
 of a call to FusekiServer for the case of one dataset, responding to
 localhost only).
 
 The application calls start() to run the server (it will run in the background : see join()).
 
Example:
      DatasetGraph dsg = ...;
      FusekiServer server = FusekiServer.create()
          .port(1234)
          .add("/ds", dsg)
          .build();
       server.start();
 
 
 Supplying a port number of 0, causes the server to allocate a free port and use
 that. The actual port can be found with getPort().
 
 The following compact form builds a server that only responds to localhost traffic:
 
    FusekiServer.make(1234, "/ds", dsg).start();
 
 which may be useful for a test server.- 
Nested Class Summary
Nested Classes - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault port when running in Java viaFusekiServer....build(). - 
Method Summary
Modifier and TypeMethodDescriptionstatic FusekiServerDeprecated.static FusekiServer.Buildercreate()Return a builder, with the default choices of actions available.static FusekiServer.Buildercreate(org.apache.jena.fuseki.server.OperationRegistry serviceDispatchRegistry) Deprecated, for removal: This API element is subject to removal in a future version.static FusekiServer.Buildercreate(org.apache.jena.fuseki.server.OperationRegistry serviceDispatchRegistry, org.apache.jena.sparql.util.Context context) Return a builder, with a custom set of operation-action mappings.datasetURL(String dsName) Return the URL for a local dataset.static FusekiServerget(jakarta.servlet.ServletContext cxt) Return theFusekiServerassociated with aServletContext.Return the filename of the configuration file.org.apache.jena.fuseki.server.DataAccessPointRegistryGet theDataAccessPointRegistry.intGet the HTTP port.intGet the HTTPS port.org.eclipse.jetty.server.ServerGet the underlying Jetty server which has also been set up.Return the list ofFusekiModules for this server.org.apache.jena.fuseki.server.OperationRegistryGet theOperationRegistry.intgetPort()Return the port being used.jakarta.servlet.ServletContextGet theServletContextused for Fuseki processing.Return the filename to the static content area.voidjoin()Wait for the server to exit.static FusekiServerConstruct a Fuseki server for one dataset.Calculate the server URL for "localhost".start()Start the server - the server continues to run after this call returns.voidstop()Stop the server. 
- 
Field Details
- 
DefaultServerPort
public static final int DefaultServerPortDefault port when running in Java viaFusekiServer....build(). The server will be http://localhost:3330. This is not the command line port (3030) which the command line programme sets. SeeFusekiMain.defaultPortandFusekiMain.defaultHttpsPort.- See Also:
 
 
 - 
 - 
Method Details
- 
construct
Deprecated.Construct a Fuseki server from command line arguments. The return server has not been started. - 
make
public static FusekiServer make(int port, String name, org.apache.jena.sparql.core.DatasetGraph dsg) Construct a Fuseki server for one dataset. It only responds to localhost. The returned server has not been started. - 
create
Return a builder, with the default choices of actions available. - 
create
@Deprecated(forRemoval=true) public static FusekiServer.Builder create(org.apache.jena.fuseki.server.OperationRegistry serviceDispatchRegistry) Deprecated, for removal: This API element is subject to removal in a future version.Return a builder, with a custom set of operation-action mappings. An endpoint must still be created for the server to be able to provide the action. An endpoint dispatches to an operation, and an operation maps to an implementation. This is a specialised operation - normal use is the operationcreate(). - 
create
public static FusekiServer.Builder create(org.apache.jena.fuseki.server.OperationRegistry serviceDispatchRegistry, org.apache.jena.sparql.util.Context context) Return a builder, with a custom set of operation-action mappings. An endpoint must still be created for the server to be able to provide the action. An endpoint dispatches to an operation, and an operation maps to an implementation. This is a specialised operation - normal use is the operationcreate(). - 
get
Return theFusekiServerassociated with aServletContext.This will return null if the
ServletContextis not from a FusekiServer. - 
getPort
public int getPort()Return the port being used.This will be the server port, which defaults to 3330 for embedded use, and to 3030 for command line use, or one actually allocated if the port was 0 ("choose a free port").
If https is in-use, this is the HTTPS port.
If http and https are in-use, this is the HTTPS port.
If there multiple ports of the same schema, return any one port in use.
See also
getHttpPort()or UsegetHttpsPort(). - 
getHttpPort
public int getHttpPort()Get the HTTP port.Returns -1 for no HTTP port.
If there are multiple HTTP ports configured, returns one of them.
 - 
getHttpsPort
public int getHttpsPort()Get the HTTPS port.Returns -1 for no HTTPS port.
If there are multiple HTTPS ports configured, returns one of them.
 - 
serverURL
Calculate the server URL for "localhost".Example:
http://localhost:3330/. The URL ends in "/". The host name is "localhost". If both HTTP and HTTPS are available, then reply with an HTTPS URL.This operation is useful when using Fuseki as an embedded test server.
 - 
datasetURL
Return the URL for a local dataset.Example:
http://localhost:3330/dataset. The host name is "localhost". If both HTTP and HTTPS are available, then reply with an HTTPS URL.This operation is useful when using Fuseki as an embedded test server.
 - 
getJettyServer
public org.eclipse.jetty.server.Server getJettyServer()Get the underlying Jetty server which has also been set up. - 
getServletContext
public jakarta.servlet.ServletContext getServletContext()Get theServletContextused for Fuseki processing. Adding new servlets is possible with care. - 
getDataAccessPointRegistry
public org.apache.jena.fuseki.server.DataAccessPointRegistry getDataAccessPointRegistry()Get theDataAccessPointRegistry. This method is intended for inspecting the registry. - 
getOperationRegistry
public org.apache.jena.fuseki.server.OperationRegistry getOperationRegistry()Get theOperationRegistry. This method is intended for inspecting the registry. - 
getStaticContentDir
Return the filename to the static content area. Returns null if there is no such area. - 
getModules
Return the list ofFusekiModules for this server. - 
getConfigFilename
Return the filename of the configuration file. Returns null if configuration was by APIs and there is no such file was used. - 
start
Start the server - the server continues to run after this call returns. To synchronise with the server stopping, calljoin(). - 
stop
public void stop()Stop the server. - 
join
public void join()Wait for the server to exit. This call starts the server if it has not already been started. This call is blocking and does not return unless there is an error. 
 - 
 
FusekiMainRunner.construct(java.lang.String...)orFusekiServerRunner.construct(java.lang.String...)