Method from org.apache.geronimo.deployment.plugin.jmx.RemoteDeploymentManager Detail: |
public File archive(String sourcePath,
String destPath,
Artifact artifact) throws ArchiverException, IOException {
ServerArchiver archiver = getServerArchiver();
try {
return archiver.archive(sourcePath, destPath, artifact);
} finally {
kernel.getProxyManager().destroyProxy(archiver);
}
}
|
public DownloadResults checkOnInstall(Object key) {
PluginInstaller installer = getPluginInstaller();
try {
return installer.checkOnInstall(key);
} finally {
kernel.getProxyManager().destroyProxy(installer);
}
}
|
public DownloadResults checkOnInstall(Object key,
boolean remove) {
PluginInstaller installer = getPluginInstaller();
try {
return installer.checkOnInstall(key, remove);
} finally {
kernel.getProxyManager().destroyProxy(installer);
}
}
|
public Dependency[] checkPrerequisites(PluginType plugin) {
PluginInstaller installer = getPluginInstaller();
try {
return installer.checkPrerequisites(plugin);
} finally {
kernel.getProxyManager().destroyProxy(installer);
}
}
|
protected DistributeCommand createDistributeCommand(Target[] targetList,
File moduleArchive,
File deploymentPlan) {
if (isSameMachine) {
return super.createDistributeCommand(targetList, moduleArchive, deploymentPlan);
} else {
return new org.apache.geronimo.deployment.plugin.remote.DistributeCommand(kernel, targetList, moduleArchive,
deploymentPlan);
}
}
|
protected DistributeCommand createDistributeCommand(Target[] targetList,
ModuleType moduleType,
InputStream moduleArchive,
InputStream deploymentPlan) {
if (isSameMachine) {
return super.createDistributeCommand(targetList, moduleType, moduleArchive, deploymentPlan);
} else {
return new org.apache.geronimo.deployment.plugin.remote.DistributeCommand(kernel, targetList, moduleType,
moduleArchive, deploymentPlan);
}
}
|
public PluginListType createPluginListForRepositories(String repo) throws NoSuchStoreException {
PluginInstaller installer = getPluginInstaller();
try {
return installer.createPluginListForRepositories(repo);
} finally {
kernel.getProxyManager().destroyProxy(installer);
}
}
|
protected RedeployCommand createRedeployCommand(TargetModuleID[] moduleIDList,
File moduleArchive,
File deploymentPlan) {
if (isSameMachine) {
return super.createRedeployCommand(moduleIDList, moduleArchive, deploymentPlan);
} else {
return new org.apache.geronimo.deployment.plugin.remote.RedeployCommand(kernel, moduleIDList, moduleArchive,
deploymentPlan);
}
}
|
protected RedeployCommand createRedeployCommand(TargetModuleID[] moduleIDList,
InputStream moduleArchive,
InputStream deploymentPlan) {
if (isSameMachine) {
return super.createRedeployCommand(moduleIDList, moduleArchive, deploymentPlan);
} else {
return new org.apache.geronimo.deployment.plugin.remote.RedeployCommand(kernel, moduleIDList, moduleArchive,
deploymentPlan);
}
}
|
public static GBeanInfo getGBeanInfo() {
return GBEAN_INFO;
}
|
public T getImplementation(Class<T> clazz) {
try {
return kernel.getGBean(clazz);
} catch (GBeanNotFoundException e) {
throw new IllegalStateException("No implementation for " + clazz.getName(), e);
}
}
|
public Map getInstalledPlugins() {
PluginInstaller installer = getPluginInstaller();
try {
return installer.getInstalledPlugins();
} finally {
kernel.getProxyManager().destroyProxy(installer);
}
}
|
public JMXConnector getJMXConnector() {
return this.jmxConnector;
}
|
public PluginType getPluginMetadata(Artifact configId) {
PluginInstaller installer = getPluginInstaller();
try {
return installer.getPluginMetadata(configId);
} finally {
kernel.getProxyManager().destroyProxy(installer);
}
}
|
public URL[] getRepositories() {
List< URL > list = new ArrayList< URL >();
Set< AbstractName > set = kernel.listGBeans(new AbstractNameQuery(PluginRepositoryList.class.getName()));
for (AbstractName name : set) {
PluginRepositoryList repo = (PluginRepositoryList) kernel.getProxyManager().createProxy(name,
PluginRepositoryList.class);
list.addAll(repo.getRepositories());
kernel.getProxyManager().destroyProxy(repo);
}
return list.toArray(new URL[list.size()]);
}
|
public void init(JMXConnector jmxConnector,
String hostname) throws IOException {
this.jmxConnector = jmxConnector;
MBeanServerConnection mbServerConnection = jmxConnector.getMBeanServerConnection();
initialize(new KernelDelegate(mbServerConnection));
checkSameMachine(hostname);
}
|
public DownloadResults install(PluginListType configsToInstall,
String defaultRepository,
boolean restrictToDefaultRepository,
String username,
String password) {
PluginInstaller installer = getPluginInstaller();
try {
return installer.install(configsToInstall, defaultRepository, restrictToDefaultRepository, username, password);
} finally {
kernel.getProxyManager().destroyProxy(installer);
}
}
|
public void install(PluginListType configsToInstall,
String defaultRepository,
boolean restrictToDefaultRepository,
String username,
String password,
DownloadPoller poller) {
PluginInstaller installer = getPluginInstaller();
try {
installer.install(configsToInstall, defaultRepository, restrictToDefaultRepository, username, password, poller);
} finally {
kernel.getProxyManager().destroyProxy(installer);
}
}
|
public Artifact installLibrary(File libFile,
String groupId) throws IOException {
File[] args = new File[]{libFile};
if(!isSameMachine) {
AbstractDeployCommand progress = new AbstractDeployCommand(CommandType.DISTRIBUTE, kernel, null, null, null, null, null, false) {
public void run() {
}
};
progress.addProgressListener(new ProgressListener() {
public void handleProgressEvent(ProgressEvent event) {
log.info(event.getDeploymentStatus().getMessage());
}
});
progress.setCommandContext(commandContext);
RemoteDeployUtil.uploadFilesToServer(args, progress);
}
Set< AbstractName > set = kernel.listGBeans(new AbstractNameQuery(PluginInstaller.class.getName()));
for (AbstractName name : set) {
PluginInstaller installer = (PluginInstaller) kernel.getProxyManager().createProxy(name, PluginInstaller.class);
// make sure to pass args[0] as RemoteDeployUtil.uploadFilesToServer will update
// the args argument with the filenames returned from the server
Artifact artifact = installer.installLibrary(args[0], groupId);
kernel.getProxyManager().destroyProxy(installer);
return artifact;
}
return null;
}
|
public DownloadResults installPluginList(String targetRepositoryPath,
String relativeTargetServerPath,
PluginListType pluginList) throws Exception {
PluginInstaller installer = getPluginInstaller();
try {
return installer.installPluginList(targetRepositoryPath, relativeTargetServerPath, pluginList);
} finally {
kernel.getProxyManager().destroyProxy(installer);
}
}
|
public boolean isSameMachine() {
return isSameMachine;
}
|
public PluginListType listPlugins(URL mavenRepository) throws FailedLoginException, IOException {
PluginInstaller installer = getPluginInstaller();
try {
return installer.listPlugins(mavenRepository);
} finally {
kernel.getProxyManager().destroyProxy(installer);
}
}
|
public void mergeOverrides(String server,
AttributesType overrides) throws InvalidGBeanException, IOException {
PluginInstaller installer = getPluginInstaller();
try {
installer.mergeOverrides(server, overrides);
} finally {
kernel.getProxyManager().destroyProxy(installer);
}
}
|
public void release() {
super.release();
try {
jmxConnector.close();
jmxConnector = null;
} catch (IOException e) {
throw (IllegalStateException) new IllegalStateException("Unable to close connection").initCause(e);
}
}
|
public Object startInstall(PluginListType configsToInstall,
String defaultRepository,
boolean restrictToDefaultRepository,
String username,
String password) {
PluginInstaller installer = getPluginInstaller();
try {
return installer.startInstall(configsToInstall, defaultRepository, restrictToDefaultRepository, username, password);
} finally {
kernel.getProxyManager().destroyProxy(installer);
}
}
|
public Object startInstall(File carFile,
String defaultRepository,
boolean restrictToDefaultRepository,
String username,
String password) {
File[] args = new File[]{carFile};
if (!isSameMachine) {
AbstractDeployCommand progress = new AbstractDeployCommand(CommandType.DISTRIBUTE, kernel, null, null, null,
null, null, false) {
public void run() {
}
};
progress.addProgressListener(new ProgressListener() {
public void handleProgressEvent(ProgressEvent event) {
log.info(event.getDeploymentStatus().getMessage());
}
});
progress.setCommandContext(commandContext);
RemoteDeployUtil.uploadFilesToServer(args, progress);
}
PluginInstaller installer = getPluginInstaller();
try {
// make sure to pass args[0] as RemoteDeployUtil.uploadFilesToServer will update
// the args argument with the filenames returned from the server
return installer.startInstall(args[0], defaultRepository, restrictToDefaultRepository, username, password);
} finally {
kernel.getProxyManager().destroyProxy(installer);
}
}
|
public void updatePluginMetadata(PluginType metadata) {
PluginInstaller installer = getPluginInstaller();
try {
installer.updatePluginMetadata(metadata);
} finally {
kernel.getProxyManager().destroyProxy(installer);
}
}
|
public boolean validatePlugin(PluginType plugin) throws MissingDependencyException {
PluginInstaller installer = getPluginInstaller();
try {
return installer.validatePlugin(plugin);
} finally {
kernel.getProxyManager().destroyProxy(installer);
}
}
|