protected class StanfordCoreNLPServer.CoreNLPHandler
extends java.lang.Object
implements com.sun.net.httpserver.HttpHandler
Modifier and Type | Field and Description |
---|---|
java.util.Properties |
defaultProps
The default properties to use in the absence of anything sent by the client.
|
Constructor and Description |
---|
CoreNLPHandler(java.util.Properties props,
java.util.function.Predicate<java.util.Properties> authenticator,
java.util.function.Consumer<StanfordCoreNLPServer.FinishedRequest> callback,
StanfordCoreNLPServer.FileHandler homepage)
Create a handler for accepting annotation requests.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentType(java.util.Properties props,
StanfordCoreNLP.OutputFormat of)
Get the response data type to send to the client, based off of the output format requested from
CoreNLP.
|
void |
handle(com.sun.net.httpserver.HttpExchange httpExchange) |
public final java.util.Properties defaultProps
public CoreNLPHandler(java.util.Properties props, java.util.function.Predicate<java.util.Properties> authenticator, java.util.function.Consumer<StanfordCoreNLPServer.FinishedRequest> callback, StanfordCoreNLPServer.FileHandler homepage)
props
- The properties file to use as the default if none were sent by the client.public java.lang.String getContentType(java.util.Properties props, StanfordCoreNLP.OutputFormat of)
props
- The properties being used by CoreNLP.of
- The output format being output by CoreNLP.public void handle(com.sun.net.httpserver.HttpExchange httpExchange) throws java.io.IOException
handle
in interface com.sun.net.httpserver.HttpHandler
java.io.IOException