public class RunnerLocal extends RunnerJava
Modifier and Type | Field and Description |
---|---|
private String |
arguments
Argument format.
|
(package private) CommandStartDAS |
command
Holding data for command execution.
|
private static String |
MAIN_CLASS
GlassFish main class to be started when using classpath.
|
(package private) ResultProcess |
result
GlassFish admin command result containing process information.
|
JAR_PARAM, javaVMExe, PARAM_ASSIGN_VALUE, PARAM_SEPARATOR, QUERY_SEPARATOR
auth, FALSE_VALUE, HTTP_CONNECTION_TIMEOUT, HTTP_RETRY_DELAY, ITEM_SEPARATOR, path, query, retry, server, silentFailureAllowed, stateListeners, TRUE_VALUE
Constructor and Description |
---|
RunnerLocal(GlassFishServer server,
Command command)
Constructs an instance of administration command executor using local
file access interface.
|
Modifier and Type | Method and Description |
---|---|
private static String |
buildJavaOptions(GlassFishServer server,
CommandStartDAS command)
Prepare Java VM options for Glassfish server execution.
|
Result |
call()
GlassFish server administration command execution call.
|
protected Result |
createResult()
Create
ResultString object corresponding
to String command execution value to be returned. |
protected boolean |
processResponse()
Extracts result value from internal storage.
|
protected boolean |
readResponse(InputStream in,
HttpURLConnection hconn)
Reads response from server and stores internally.
|
(package private) void |
setProcessCurrentDir(ProcessBuilder pb)
Set server process current directory to domain directory if exists.
|
acceptsGzip, constructCommandUrl, getDoOutput, getJavaSEConfig, getRequestMethod, getServerConfig, handleSend, setJavaEnvironment, verifyJavaVM
execute, execute, getCommand, getCommandWithQuery, getContentType, getQuery, getResult, handleReceive, handleSecureConnection, handleStateChange, isSilentFailureAllowed, parallelExecutor, prepareHttpConnection, serializedExecutor, setReadyState, setSilentFailureAllowed, setStateListeners, stateChangeArgs, stateChangeArgs, toBoolean, toString
private static final String MAIN_CLASS
final CommandStartDAS command
private String arguments
ResultProcess result
ExecutorService
's queue. method call()
is responsible for correct TaskState
and value
handling.public RunnerLocal(GlassFishServer server, Command command)
server
- GlassFish server entity object.command
- GlassFish Server Administration Command Entity.protected Result createResult()
ResultString
object corresponding
to String
command execution value to be returned.createResult
in class Runner
protected boolean readResponse(InputStream in, HttpURLConnection hconn)
readResponse
in class Runner
in
- Stream to read data from.false
.CommandException
- in case of stream error.protected boolean processResponse()
processResponse
in class Runner
false
.private static String buildJavaOptions(GlassFishServer server, CommandStartDAS command)
server
- GlassFish server entity object.command
- GlassFish Server Administration Command Entity.void setProcessCurrentDir(ProcessBuilder pb)
setProcessCurrentDir
in class RunnerJava
pb
- Process builder object where to set current directory.public Result call()
executor's serialization queue.
Attempts to start local GalssFish DAS directly using java
executable.
Copyright © 2013. All Rights Reserved.