Package org.apache.geronimo.deployment.cli

Examples of org.apache.geronimo.deployment.cli.ServerConnection$UsernamePasswordHandler


     *
     * @return
     * @exception Exception
     */
    protected Object doExecute() throws Exception {
        ServerConnection connection = openConnection(false);
        // Forward to the override
        return doExecute(connection);
    }
View Full Code Here


     * to the target host and use it.
     *
     * @return A ServerConnection object for talking to the target server.
     */
    protected ServerConnection connect() throws Exception {
        ServerConnection connection = (ServerConnection)session.get(SERVER_CONNECTION);

        if (connection == null) {
            connection = openConnection(false);
        }

View Full Code Here

    /**
     * Disconnect the current server connection, if any.
     */
    protected void disconnect() {
        // disconnect the session if there is something set in the command session
        ServerConnection connection = (ServerConnection)session.get(SERVER_CONNECTION);

        if (connection != null) {
            try {
                connection.close();
            }
            catch (Exception e) {
                // ignore
            }
        }
View Full Code Here

     * @exception Exception
     */
    protected ServerConnection openConnection(boolean quiet) throws Exception {
        Kernel kernel = getKernel();

        ServerConnection connection;

        if (isEmbeddedServer(hostname, port)) {
            connection = new OfflineServerConnection(kernel, false);
        } else {
            if (!quiet) {
View Full Code Here

    @Argument(required = true, multiValued = true, description = "keystore name")
    List<String> keystoreNames;

    @Override
    protected Object doExecute() throws Exception {
        ServerConnection connection = connect();

        AbstractCommand command = new CommandUnlockKeystore();

        BaseCommandArgs args = new BaseCommandArgs(keystoreNames.toArray(new String[keystoreNames.size()]));
View Full Code Here

    @Argument(required = true, description = "Bundle Id")
    String bundleId;

    @Override
    protected Object doExecute() throws Exception {
        ServerConnection connection = connect();

        AbstractCommand command = new CommandUninstallBundle();

        BaseCommandArgs args = new BaseCommandArgs(new String[]{bundleId});
View Full Code Here

    @Argument(multiValued = true)
    List<String> pluginArtifacts;

    @Override
    protected Object doExecute() throws Exception {
        ServerConnection connection = connect();

        CommandListConfigurations command = new CommandListConfigurations();

        String repo = null;
        PluginListType plugins = null;

        if (mavenRepoURL != null) {
            plugins = command.getPluginCategories(mavenRepoURL, (GeronimoDeploymentManager) connection
                    .getDeploymentManager(), this);
            repo = mavenRepoURL;
        } else {
            println("Listing configurations from Geronimo server");

            repo = (String) session.get("PluginRepository");
            if (refreshRepo || repo == null) {
                session.put("AvailablePlugins", null);
                repo = command.getRepository(this, (GeronimoDeploymentManager) connection
                        .getDeploymentManager());
                session.put("PluginRepository", repo);
            }

            plugins = (PluginListType) session.get("AvailablePlugins");
            if (refreshList || plugins == null) {
                plugins = command.getPluginCategories(repo, (GeronimoDeploymentManager) connection
                        .getDeploymentManager(), this);
                session.put("AvailablePlugins", plugins);
            }
        }

        if (plugins != null) {
            if (pluginArtifacts != null) {
                command.installPlugins((GeronimoDeploymentManager) connection.getDeploymentManager(), pluginArtifacts,
                        plugins, repo, this, connection);
            } else {
                PluginListType pluginsToInstall = command.getInstallList(plugins, this, repo);

                if (pluginsToInstall != null) {
                    command.installPlugins((GeronimoDeploymentManager) connection.getDeploymentManager(),
                            pluginsToInstall, repo, this, connection);
                }
            }
        }
View Full Code Here

    @Argument(required = true, description = "Plugin file")
    String pluginFile;

    @Override
    protected Object doExecute() throws Exception {
        ServerConnection connection = connect();

        CommandInstallCAR command = new CommandInstallCAR();

        BaseCommandArgs args = new BaseCommandArgs(pluginFile.trim().split("[ ]"));
View Full Code Here

    @Argument(required = true, description = "Bundle file")
    String bundleFile;

    @Override
    protected Object doExecute() throws Exception {
        ServerConnection connection = connect();

        CommandInstallBundle command = new CommandInstallBundle();

        InstallBundleCommandArgs args = new InstallBundleCommandArgsImpl(groupId, startLevel, start, new String[]{bundleFile});
View Full Code Here

public class LoginCommand extends ConnectCommand {

    @Override
    protected Object doExecute() throws Exception {

        ServerConnection connection = connect();

        if (connection instanceof OfflineServerConnection) {
            println("No credentials to save in embedded mode.");
            return null;
        }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.deployment.cli.ServerConnection$UsernamePasswordHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.