Package com.Lomikel.GroovyServer
Class RemoteGroovyServer
java.lang.Object
com.Lomikel.GroovyServer.RemoteGroovyServer
RemoteGroovyServer allows .to execute Groovy
scripts remotely.- Author:
- J.Hrivnac
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static org.apache.logging.log4j.LoggerLogging .private static final intprivate static final ScriptEngineManagerprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Stringprivate static voiddoHandleEval(HttpExchange exchange) private static voidhandleEval(HttpExchange exchange) static voidStart the server on defaulr port and with default security.parseQuery(String rawQuery) private static Objectprivate static voidsend(HttpExchange exchange, int statusCode, String response)
-
Field Details
-
PORT
- See Also:
-
TOKEN
- See Also:
-
SCRIPT_ENGINE_MANAGER
-
log
Logging .
-
-
Constructor Details
-
RemoteGroovyServer
public RemoteGroovyServer()
-
-
Method Details
-
main
Start the server on defaulr port and with default security.- Throws:
Exception
-
handleEval
- Throws:
IOException
-
doHandleEval
- Throws:
Exception
-
runGroovyScript
private static Object runGroovyScript(String script, Map<String, List<String>> params) throws ScriptException- Throws:
ScriptException
-
parseQuery
-
decode
-
send
- Throws:
IOException
-