
org.objectweb.petals.ant.task.InstallSharedLibraryTask Maven / Gradle / Ivy
The newest version!
/**
* PETALS: PETALS Services Platform
* Copyright (C) 2005 EBM WebSourcing
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): EBM WebSourcing
*/
package org.objectweb.petals.ant.task;
import java.io.IOException;
import javax.management.MBeanServerConnection;
import org.objectweb.petals.ant.AbstractInstallerAntTask;
/**
* Ant task : jbi-install-shared-library. This task install a shared library
* into the JBI environment.
*
* @author ddesjardins chamerling - eBMWebsourcing
*/
public class InstallSharedLibraryTask extends AbstractInstallerAntTask {
/**
* Creates a new instance of {@link InstallSharedLibraryTask}
*
*/
public InstallSharedLibraryTask() {
super();
}
/**
* Execute the ant task
*
* @throws IOException
*/
public void doTask() throws Exception {
MBeanServerConnection connection = connector.getMBeanServerConnection();
Object[] objects = new Object[1];
objects[0] = file;
String[] strings = new String[1];
strings[0] = "java.lang.String";
Object result = performAction(connection, INSTALL_SHARED_LIBRARY);
if (result instanceof String) {
try {
log("The shared library '" + (String) result
+ "' has been installed");
} catch (NullPointerException e) {
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy