public class ServerHTTP extends Object
| Constructor and Description |
|---|
ServerHTTP(ai.grakn.engine.GraknConfig prop,
spark.Service spark,
EngineGraknTxFactory factory,
com.codahale.metrics.MetricRegistry metricRegistry,
ServerStatus serverStatus,
PostProcessor postProcessor,
ServerRPC rpcServerRPC,
Collection<HttpController> additionalCollaborators) |
| Modifier and Type | Method and Description |
|---|---|
static void |
configureSpark(spark.Service spark,
ai.grakn.engine.GraknConfig prop) |
static void |
configureSpark(spark.Service spark,
String hostName,
int port,
Path staticFolder,
int maxThreads) |
protected static void |
handleGraknServerError(ai.grakn.exception.GraknServerException exception,
spark.Response response)
Handle any
GraknBackendException that are thrown by the server. |
protected static void |
handleInternalError(Exception exception,
spark.Response response)
Handle any exception thrown by the server
|
protected void |
startCollaborators() |
void |
startHTTP() |
void |
stopHTTP() |
public ServerHTTP(ai.grakn.engine.GraknConfig prop,
spark.Service spark,
EngineGraknTxFactory factory,
com.codahale.metrics.MetricRegistry metricRegistry,
ServerStatus serverStatus,
PostProcessor postProcessor,
ServerRPC rpcServerRPC,
Collection<HttpController> additionalCollaborators)
public void startHTTP()
throws IOException
IOExceptionprotected void startCollaborators()
public static void configureSpark(spark.Service spark,
ai.grakn.engine.GraknConfig prop)
public static void configureSpark(spark.Service spark,
String hostName,
int port,
Path staticFolder,
int maxThreads)
public void stopHTTP()
throws InterruptedException
InterruptedExceptionprotected static void handleGraknServerError(ai.grakn.exception.GraknServerException exception,
spark.Response response)
GraknBackendException that are thrown by the server. Configures and returns
the correct JSON response.exception - exception thrown by the serverresponse - response to the clientprotected static void handleInternalError(Exception exception, spark.Response response)
exception - Exception by the serverresponse - response to the clientCopyright © 2018 Grakn Labs Ltd. All rights reserved.