org.sonatype.gshell.shell
Interface Shell

All Known Implementing Classes:
ShellImpl

public interface Shell

Provides access to execute commands.

Since:
2.0
Author:
Jason Dillon

Method Summary
 void close()
           
 Object execute(CharSequence line)
           
 Object execute(CharSequence command, Object[] args)
           
 Object execute(Object... args)
           
 Branding getBranding()
           
 History getHistory()
           
 IO getIo()
           
 Variables getVariables()
           
 boolean isInteractive()
          Check if the shell can be run interactively.
 boolean isOpened()
           
 void run(Object... args)
          Run the shell interactively.
 

Method Detail

getBranding

Branding getBranding()

getIo

IO getIo()

getVariables

Variables getVariables()

getHistory

History getHistory()

isOpened

boolean isOpened()

close

void close()

execute

Object execute(CharSequence line)
               throws Exception
Throws:
Exception

execute

Object execute(CharSequence command,
               Object[] args)
               throws Exception
Throws:
Exception

execute

Object execute(Object... args)
               throws Exception
Throws:
Exception

isInteractive

boolean isInteractive()
Check if the shell can be run interactively.

Returns:
True if the shell is interactive.

run

void run(Object... args)
         throws Exception
Run the shell interactively.

Parameters:
args - The initial commands to execute interactively.
Throws:
Exception - Failed to execute commands.
UnsupportedOperationException - The shell does not support interactive execution.


Copyright © 2008-2011 Sonatype. All Rights Reserved.