String address = pluginConfiguration.getSimpleValue(PLUGIN_CONFIG_PROP_ADDRESS, null);
String port = pluginConfiguration.getSimpleValue(PLUGIN_CONFIG_PROP_PORT, null);
String clientJar = pluginConfiguration.getSimpleValue(PLUGIN_CONFIG_PROP_CLIENT_JAR, null);
if (address == null) {
throw new InvalidPluginConfigurationException("Byteman address was not specified");
}
if (port == null) {
throw new InvalidPluginConfigurationException("Byteman port was not specified");
}
if (clientJar == null) {
throw new InvalidPluginConfigurationException("Byteman client jar was not specified");
}
try {
Integer.parseInt(port);
} catch (NumberFormatException e) {
throw new InvalidPluginConfigurationException("Port number was invalid: " + port, e);
}
File clientJarFile = new File(clientJar);
if (!clientJarFile.isFile() || !clientJarFile.canRead()) {
throw new InvalidPluginConfigurationException("Byteman client jar [" + clientJar + "] cannot be read");
}
// build the general information for the new resource
String key = address + ':' + port;
String name = DEFAULT_NAME;