public class CommandSetProperty extends Command
Modifier and Type | Field and Description |
---|---|
private static String |
COMMAND
Command string for create-cluster command.
|
private static String |
ERROR_MESSAGE_MIDDLE
Error message middle part for administration command execution
exception .
|
private static String |
ERROR_MESSAGE_PREFIX
Error message prefix for administration command execution exception .
|
(package private) String |
format
Format for the query string.
|
(package private) String |
property
Name of the property to set.
|
(package private) String |
value
Value of the property to set.
|
Constructor and Description |
---|
CommandSetProperty(String property,
String value)
Constructs an instance of GlassFish server set property command entity.
|
CommandSetProperty(String property,
String value,
String format)
Constructs an instance of GlassFish server set property command entity.
|
Modifier and Type | Method and Description |
---|---|
private static String |
errorMessage(CommandSetProperty command)
Build error message from command property name and it's value.
|
String |
getProperty()
Get name of the property to set.
|
String |
getValue()
Get value of the property to set.
|
static ResultString |
setProperty(GlassFishServer server,
CommandSetProperty command)
Put property to server.
|
static ResultString |
setProperty(GlassFishServer server,
CommandSetProperty command,
long timeout)
Put property to server.
|
getCommand, retry
private static final String COMMAND
private static final String ERROR_MESSAGE_PREFIX
private static final String ERROR_MESSAGE_MIDDLE
final String property
final String value
final String format
public CommandSetProperty(String property, String value, String format)
property
- Name of the property to set.value
- Value of the property to set.format
- Format for the query string.private static final String errorMessage(CommandSetProperty command)
command
- Command used to build error message.public static ResultString setProperty(GlassFishServer server, CommandSetProperty command) throws GlassFishIdeException
server
- GlassFish server entity.command
- Command to set property value.String
with
result message.GlassFishIdeException
- When error occurred during administration
command execution.public static ResultString setProperty(GlassFishServer server, CommandSetProperty command, long timeout) throws GlassFishIdeException
server
- GlassFish server entity.command
- Command to set property value.timeout
- Administration command execution timeout [ms].String
with
result message.GlassFishIdeException
- When error occurred during administration
command execution.public String getProperty()
public String getValue()
Copyright © 2013. All Rights Reserved.