public class RunnerHttpDeploy extends RunnerHttp
deploy
Administration Command Execution
using HTTP interface.
Class implements GlassFish server administration functionality trough HTTP
interface.
Modifier and Type | Field and Description |
---|---|
(package private) CommandDeploy |
command
Holding data for command execution.
|
private static String |
CTXROOT_PARAM
Deploy command
contextroot parameter name. |
private static String |
DEFAULT_PARAM
Deploy command
DEFAULT parameter name. |
private static String |
FORCE_PARAM
Deploy command
force parameter name. |
private static boolean |
FORCE_VALUE
Deploy command
force parameter value. |
private static String |
LIBRARIES_PARAM
Deploy command
libraries parameter name. |
private static Logger |
LOGGER
Logger instance for this class.
|
private static String |
NAME_PARAM
Deploy command
name parameter name. |
private static String |
PROPERTIES_PARAM
Deploy command
properties parameter name. |
private static String |
TARGET_PARAM
Deploy command
target parameter name. |
LIBRARY_SEPARATOR, manifest, result
auth, FALSE_VALUE, HTTP_CONNECTION_TIMEOUT, HTTP_RETRY_DELAY, ITEM_SEPARATOR, PARAM_ASSIGN_VALUE, PARAM_SEPARATOR, path, query, QUERY_SEPARATOR, retry, server, silentFailureAllowed, stateListeners, TRUE_VALUE
Constructor and Description |
---|
RunnerHttpDeploy(GlassFishServer server,
Command command)
Constructs an instance of administration command executor using
HTTP interface.
|
Modifier and Type | Method and Description |
---|---|
String |
getContentType()
Set the content-type of information sent to the server.
|
boolean |
getDoOutput()
Send deployed file to the server via HTTP POST when it's not
a directory deployment.
|
InputStream |
getInputStream()
Get
InputStream object for deployed file. |
String |
getLastModified()
Provide the lastModified date for data source whose
InputStream is returned by getInputStream. |
String |
getRequestMethod()
HTTP request method used for this command is
POST for
file deployment and GET for directory deployment. |
protected void |
handleSend(HttpURLConnection hconn)
Handle sending data to server using HTTP command interface.
|
private static String |
query(Command command)
Builds deploy query string for given command.
|
acceptsGzip, constructCommandUrl, createResult, getExtraProperties, prepareHttpConnection, processResponse, queryLibrariesAppend, queryLibrariesLength, queryPropertiesAppend, queryPropertiesLength, readResponse
call, execute, execute, getCommand, getCommandWithQuery, getQuery, getResult, handleReceive, handleSecureConnection, handleStateChange, isSilentFailureAllowed, parallelExecutor, serializedExecutor, setReadyState, setSilentFailureAllowed, setStateListeners, stateChangeArgs, stateChangeArgs, toBoolean, toString
private static final Logger LOGGER
private static final String DEFAULT_PARAM
DEFAULT
parameter name.private static final String TARGET_PARAM
target
parameter name.private static final String NAME_PARAM
name
parameter name.private static final String CTXROOT_PARAM
contextroot
parameter name.private static final String FORCE_PARAM
force
parameter name.private static final String PROPERTIES_PARAM
properties
parameter name.private static final String LIBRARIES_PARAM
libraries
parameter name.private static final boolean FORCE_VALUE
force
parameter value.final CommandDeploy command
public RunnerHttpDeploy(GlassFishServer server, Command command)
server
- GlassFish server entity object.command
- GlassFish server administration command entity.private static String query(Command command)
QUERY :: "DEFAULT" '=' <path>
'&' "force" '=' true | false
['&' "name" '=' <name> ]
['&' "target" '=' <target> ]
['&' "contextroot" '=' <contextRoot> ]
['&' "properties" '=' <pname> '=' <pvalue>
{ ':' <pname> '=' <pvalue>} ]
['&' "libraries" '=' <lname> '=' <lvalue>
{ ':' <lname> '=' <lvalue>} ]
command
- GlassFish server administration deploy command entity.public boolean getDoOutput()
getDoOutput
in class RunnerHttp
true
if using HTTP POST to send to server
or false
otherwisepublic String getRequestMethod()
POST
for
file deployment and GET
for directory deployment.getRequestMethod
in class RunnerHttp
protected void handleSend(HttpURLConnection hconn) throws IOException
CLIRemoteCommand.java
from the server's code repository. Since some asadmin commands
need to send multiple files, the server assumes the input is a ZIP
stream.handleSend
in class RunnerHttp
IOException
public String getContentType()
application/zip
for file deployment
and null
(not set) for directory deployment.getContentType
in class Runner
public String getLastModified()
InputStream
is returned by getInputStream.
getLastModified
in class RunnerHttp
public InputStream getInputStream()
InputStream
object for deployed file.
InputStream
object for deployed file
or null
for directory deployment.Copyright © 2013. All Rights Reserved.