abstract class RunnerJava extends Runner
Modifier and Type | Field and Description |
---|---|
(package private) CommandJava |
command
Holding data for command execution.
|
(package private) static String |
JAR_PARAM
Specifies program encapsulated in a JAR file to execute.
|
(package private) String |
javaVMExe
Java VM executable.
|
private static Logger |
LOGGER
Logger instance for this class.
|
(package private) static char |
PARAM_ASSIGN_VALUE
Character used to assign value to parameter.
|
(package private) static char |
PARAM_SEPARATOR
Character used to separate individual parameters.
|
(package private) static char |
QUERY_SEPARATOR
Character used to separate query string from list of parameters.
|
auth, FALSE_VALUE, HTTP_CONNECTION_TIMEOUT, HTTP_RETRY_DELAY, ITEM_SEPARATOR, path, query, result, retry, server, silentFailureAllowed, stateListeners, TRUE_VALUE
Constructor and Description |
---|
RunnerJava(GlassFishServer server,
Command command)
Constructs an instance of administration command executor using
command line asadmin interface.
|
RunnerJava(GlassFishServer server,
Command command,
String query)
Constructs an instance of administration command executor using
command line asadmin interface.
|
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsGzip()
Inform whether this runner implementation accepts gzip format.
|
protected String |
constructCommandUrl()
Build GlassFish administration interface command URL.
|
boolean |
getDoOutput()
Do not send information to the server via HTTP POST by default.
|
(package private) static JavaSESet |
getJavaSEConfig(GlassFishConfig config)
Get
JavaSESet instance for provided GlassFish server
features configuration. |
private static String |
getJavaVM(GlassFishServer server,
CommandJava command)
Constructs path to Java VM executable and verifies if it exists.
|
protected String |
getRequestMethod()
The type of HTTP method used to access administration interface command.
|
(package private) static GlassFishConfig |
getServerConfig(GlassFishServer server)
Get
GlassFishConfig instance for provided GlassFish server which
shall not be null . |
protected void |
handleSend(HttpURLConnection hconn)
Handle sending data to server using HTTP administration command interface.
|
(package private) static void |
setJavaEnvironment(Map<String,String> env,
CommandJava command)
Prepare Java VM environment for Glassfish server execution.
|
(package private) void |
setProcessCurrentDir(ProcessBuilder pb)
Set server process current directory to domain directory if exists.
|
(package private) boolean |
verifyJavaVM()
Verifies if Java VM version is supported by provided GlassFish server.
|
call, createResult, execute, execute, getCommand, getCommandWithQuery, getContentType, getQuery, getResult, handleReceive, handleSecureConnection, handleStateChange, isSilentFailureAllowed, parallelExecutor, prepareHttpConnection, processResponse, readResponse, serializedExecutor, setReadyState, setSilentFailureAllowed, setStateListeners, stateChangeArgs, stateChangeArgs, toBoolean, toString
private static final Logger LOGGER
static final String JAR_PARAM
static final char QUERY_SEPARATOR
static final char PARAM_SEPARATOR
static final char PARAM_ASSIGN_VALUE
final CommandJava command
final String javaVMExe
public RunnerJava(GlassFishServer server, Command command, String query)
server
- GlassFish server entity object.command
- GlassFish server administration command entity.query
- Query string for this command.public RunnerJava(GlassFishServer server, Command command)
server
- GlassFish server entity object.command
- GlassFish server administration command entity.query
- Query string for this command.static GlassFishConfig getServerConfig(GlassFishServer server)
GlassFishConfig
instance for provided GlassFish server which
shall not be null
.
CommandException
is thrown when configuration object value
is null
.
server
- GlassFish server entity object.null
.static JavaSESet getJavaSEConfig(GlassFishConfig config)
JavaSESet
instance for provided GlassFish server
features configuration.
config
- GlassFish server features configuration.null
.private static String getJavaVM(GlassFishServer server, CommandJava command)
server
- GlassFish server entity object.command
- lassFish server administration command with local Java VM.public boolean getDoOutput()
getDoOutput
in class Runner
false
.public boolean acceptsGzip()
acceptsGzip
in class Runner
false
.protected String constructCommandUrl() throws CommandException
constructCommandUrl
in class Runner
null
.CommandException
- if there is a problem with building
command URL.CommandException
protected String getRequestMethod()
getRequestMethod
in class Runner
null
.protected void handleSend(HttpURLConnection hconn) throws IOException
handleSend
in class Runner
IOException
boolean verifyJavaVM()
true
when Java VM executable version
is known and supported by provided GlassFish server
or false
otherwise.static void setJavaEnvironment(Map<String,String> env, CommandJava command)
env
- Process builder environment Map
.command
- GlassFish Server Administration Command Entity.void setProcessCurrentDir(ProcessBuilder pb)
pb
- Process builder object where to set current directory.Copyright © 2013. All Rights Reserved.