org.fusesource.fabric.utils.shell
Class ShellUtils

java.lang.Object
  extended by org.fusesource.fabric.utils.shell.ShellUtils

public class ShellUtils
extends java.lang.Object


Method Summary
static int getTermWidth(org.apache.felix.service.command.CommandSession session)
          Returns the width.
static java.lang.String readLine(org.apache.felix.service.command.CommandSession session, java.lang.String msg, boolean hidden)
          Displays the message and reads the input.
static java.lang.String retrieveFabricUser(org.apache.felix.service.command.CommandSession session)
          Returns the fabric username stored in the CommandSession.
static java.lang.String retrieveFabricUserPassword(org.apache.felix.service.command.CommandSession session)
          Returns the fabric username stored in the CommandSession.
static java.lang.String retrieveFabricZookeeperPassword(org.apache.felix.service.command.CommandSession session)
          Returns the fabric zookeeper password stored in the CommandSession.
static void storeFabricCredentials(org.apache.felix.service.command.CommandSession session, java.lang.String username, java.lang.String password)
          Stores username and password to the CommandSession.
static void storeZookeeperPassword(org.apache.felix.service.command.CommandSession session, java.lang.String zookeeperPassword)
          Stores zookeeper password to the CommandSession.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

storeFabricCredentials

public static void storeFabricCredentials(org.apache.felix.service.command.CommandSession session,
                                          java.lang.String username,
                                          java.lang.String password)
Stores username and password to the CommandSession.

Parameters:
session -
username -
password -

storeZookeeperPassword

public static void storeZookeeperPassword(org.apache.felix.service.command.CommandSession session,
                                          java.lang.String zookeeperPassword)
Stores zookeeper password to the CommandSession. This is mostly usable when creating a remote ensemble that is going to be joined right after its creation.

Parameters:
session -
zookeeperPassword -

retrieveFabricUser

public static java.lang.String retrieveFabricUser(org.apache.felix.service.command.CommandSession session)
Returns the fabric username stored in the CommandSession.

Parameters:
session -
Returns:

retrieveFabricUserPassword

public static java.lang.String retrieveFabricUserPassword(org.apache.felix.service.command.CommandSession session)
Returns the fabric username stored in the CommandSession.

Parameters:
session -
Returns:

retrieveFabricZookeeperPassword

public static java.lang.String retrieveFabricZookeeperPassword(org.apache.felix.service.command.CommandSession session)
Returns the fabric zookeeper password stored in the CommandSession.

Parameters:
session -
Returns:

readLine

public static java.lang.String readLine(org.apache.felix.service.command.CommandSession session,
                                        java.lang.String msg,
                                        boolean hidden)
                                 throws java.io.IOException
Displays the message and reads the input.

Parameters:
session - The CommandSession to use.
msg - The message to display.
hidden - Flag to hide the user input.
Returns:
Throws:
java.io.IOException

getTermWidth

public static int getTermWidth(org.apache.felix.service.command.CommandSession session)
Returns the width.

Parameters:
session -
Returns:


Copyright © 2013 Red Hat. All Rights Reserved.