public class FusekiServer extends Object
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 should call start()
to actually start 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();Compact form (use the builder pattern above to get more flexibility):
FusekiServer.make(1234, "/ds", dsg).start();
Modifier and Type | Class and Description |
---|---|
static class |
FusekiServer.Builder
FusekiServer.Builder
|
Modifier and Type | Field and Description |
---|---|
org.eclipse.jetty.server.Server |
server |
Modifier and Type | Method and Description |
---|---|
static FusekiServer.Builder |
create()
Return a builder, with the default choices of actions available.
|
static FusekiServer.Builder |
create(OperationRegistry serviceDispatchRegistry)
Return a builder, with a custom set of operation-action mappings.
|
DataAccessPointRegistry |
getDataAccessPointRegistry()
Get the
DataAccessPointRegistry . |
org.eclipse.jetty.server.Server |
getJettyServer()
Get the underlying Jetty server which has also been set up.
|
OperationRegistry |
getOperationRegistry()
Get the
OperationRegistry . |
int |
getPort()
Return the port being used.
|
javax.servlet.ServletContext |
getServletContext()
Get the
ServletContext used for Fuseki processing. |
boolean |
hasUserAccessControl()
Return whether this server has any access control enabled.
|
void |
join()
Wait for the server to exit.
|
static FusekiServer |
make(int port,
String name,
DatasetGraph dsg)
Construct a Fuseki server for one dataset.
|
FusekiServer |
start()
Start the server - the server continues to run after this call returns.
|
void |
stop()
Stop the server.
|
public static FusekiServer make(int port, String name, DatasetGraph dsg)
public static FusekiServer.Builder create()
public static FusekiServer.Builder create(OperationRegistry serviceDispatchRegistry)
create()
.public int getPort()
public org.eclipse.jetty.server.Server getJettyServer()
public javax.servlet.ServletContext getServletContext()
ServletContext
used for Fuseki processing.
Adding new servlets is possible with care.public DataAccessPointRegistry getDataAccessPointRegistry()
DataAccessPointRegistry
.
This method is intended for inspecting the registry.public OperationRegistry getOperationRegistry()
OperationRegistry
.
This method is intended for inspecting the registry.public boolean hasUserAccessControl()
public FusekiServer start()
join()
.public void stop()
public void join()
Licensed under the Apache License, Version 2.0