java.lang.Object
org.apache.jena.fuseki.main.JettyServer.Builder
- Enclosing class:
- JettyServer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd the given filter with the pathSpec.addServlet
(String pathSpec, jakarta.servlet.http.HttpServlet servlet) Add the given servlet with the pathSpec.addServletAttribute
(String attrName, Object value) Add a servlet attribute.build()
Build a server according to the current description.contextPath
(String path) Context path.errorHandler
(org.eclipse.jetty.server.handler.ErrorHandler errorHandler) Set anErrorHandler
.jettyServerConfig
(String filename) Build the server using a Jetty configuration file.loopback
(boolean loopback) Restrict the server to only responding to the localhost interface.maxServerThreads
(int maxThreads) Set the maximum number threads used by Jetty.numServerThreads
(int minThreads, int maxThreads) Set the number threads used by Jetty.port
(int port) Set the port to run on.securityHandler
(org.eclipse.jetty.security.SecurityHandler securityHandler) Set a Jetty SecurityHandler.servletContextName
(String name) ServletContextName.staticFileBase
(String directory) Set the location (filing system directory) to serve static file from.verbose
(boolean verbose) Set verbose logging
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
port
Set the port to run on. -
jettyServerConfig
Build the server using a Jetty configuration file. See Jetty/Reference/jetty.xml_syntax This is instead of any other server settings such as port or https. -
contextPath
Context path. If it's "/" then Server URL will look like "http://host:port/" else "http://host:port/path/" (or no port if :80). -
servletContextName
ServletContextName. -
loopback
Restrict the server to only responding to the localhost interface. -
staticFileBase
Set the location (filing system directory) to serve static file from. -
securityHandler
public JettyServer.Builder securityHandler(org.eclipse.jetty.security.SecurityHandler securityHandler) Set a Jetty SecurityHandler.By default, the server runs with no security. This is more for using the basic server for testing. The full Fuseki server provides security with Apache Shiro and a defensive reverse proxy (e.g. Apache httpd) in front of the Jetty server can also be used, which provides a wide varity of proven security options.
-
errorHandler
Set anErrorHandler
.By default, the server runs with error handle that prints the code and message.
-
verbose
Set verbose logging -
numServerThreads
Set the number threads used by Jetty. This uses aorg.eclipse.jetty.util.thread.QueuedThreadPool
provided by Jetty.Argument order is (minThreads, maxThreads).
- Use (-1,-1) for Jetty "default". The Jetty 9.4 defaults are (min=8,max=200).
- If (min != -1, max is -1) then the default max is 20.
- If (min is -1, max != -1) then the default min is 2.
-
maxServerThreads
Set the maximum number threads used by Jetty. This is equivalent tonumServerThreads(-1, maxThreads)
and overrides any previous setting of the maximum number of threads. In development or in embedded use, limiting the maximum threads can be useful. -
addServlet
Add the given servlet with the pathSpec. These are added so that they are before the static content handler (which is the last servlet) used forstaticFileBase(String)
. -
addServletAttribute
Add a servlet attribute. Pass a value of null to remove any existing binding. -
addFilter
Add the given filter with the pathSpec. It is applied to all dispatch types. -
build
Build a server according to the current description.
-