Method from org.apache.geronimo.farm.plugin.JpaNodeInfo Detail: |
public synchronized void disconnect() throws IOException {
if (kernel != null) {
if (pluginInstaller != null) {
kernel.getProxyManager().destroyProxy(pluginInstaller);
pluginInstaller = null;
}
if (!local) {
jmxConnector.close();
jmxConnector = null;
}
kernel = null;
}
}
|
public JpaClusterInfo getCluster() {
return cluster;
}
|
public synchronized ConfigurationManager getConfigurationManager() throws IOException {
if (configurationManager != null) {
return configurationManager;
}
Kernel kernel = newKernel();
Set< AbstractName > set = kernel.listGBeans(new AbstractNameQuery(ConfigurationManager.class.getName()));
for (AbstractName name : set) {
configurationManager = kernel.getProxyManager().createProxy(name, ConfigurationManager.class);
return configurationManager;
}
throw new IllegalStateException("No plugin installer found");
}
|
public ExtendedJMXConnectorInfo getConnectorInfo() {
return new BasicExtendedJMXConnectorInfo(userName, password, protocol, host, port, urlPath, local);
}
|
public String getName() {
return name;
}
|
public synchronized PluginInstaller getPluginInstaller() throws IOException {
if (pluginInstaller != null) {
return pluginInstaller;
}
Kernel kernel = newKernel();
Set< AbstractName > set = kernel.listGBeans(new AbstractNameQuery(PluginInstaller.class.getName()));
for (AbstractName name : set) {
pluginInstaller = kernel.getProxyManager().createProxy(name, PluginInstaller.class);
return pluginInstaller;
}
throw new IllegalStateException("No plugin installer found");
}
|
public Kernel newKernel() throws IOException {
if (kernel == null) {
if (local) {
kernel = KernelRegistry.getSingleKernel();
} else {
ExtendedJMXConnectorInfo connectorInfo = getConnectorInfo();
jmxConnector = connectorInfo.connect();
return connectorInfo.newKernel(jmxConnector);
}
}
return kernel;
}
|
public void setCluster(JpaClusterInfo cluster) {
this.cluster = cluster;
}
|
public void setConnectorInfo(String userName,
String password,
String protocol,
String host,
int port,
String urlPath,
boolean local) {
this.userName = userName;
this.password = password;
this.protocol = protocol;
this.host = host;
this.port = port;
this.urlPath = urlPath;
this.local = local;
}
|
public void setName(String name) {
this.name = name;
}
|