Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.subsystems.shells.core.model
Class RemoteCommandShell


java.lang.Object
  extended by 
org.eclipse.rse.subsystems.shells.core.model.RemoteCommandShell
All Implemented Interfaces:
IAdaptable, IRemoteCommandShell
Direct Known Subclasses:
ServiceCommandShell

public abstract class RemoteCommandShell
extends Object
implements IAdaptable, IRemoteCommandShell


Field Summary
protected   ArrayList _cmdHistory
           
protected   IRemoteCmdSubSystem _cmdSubSystem
           
protected   IRemoteFile _cwd
           
protected   IRemoteFileSubSystem _fileSubSystem
           
protected   String _id
           
protected   String _name
           
protected   ArrayList _output
           
protected   IProject _project
           
protected   String _type
           
 
Constructor Summary
RemoteCommandShell ( IRemoteCmdSubSystem cmdSubSystem)
           
 
Method Summary
 void addOutput ( Object output)
          Add an output object to the list of output for this command
 void associateProject ( IProject project)
           
  Object getAdapter ( Class adapterType)
           
  IProject getAssociatedProject ()
           
abstract   ICandidateCommand[] getCandidateCommands ()
          Override to provide a list of possible commands
  IRemoteCmdSubSystem getCommandSubSystem ()
          Return the command subsystem associated with this command
  Object getContext ()
          Get the current working directory for this command
  String getContextString ()
          Returns the context of this Shell as a String for persistence.
  IRemoteFileSubSystem getFileSubSystem ()
          Return the file subsystem associated with this command
  String[] getHistory ()
          Return the list of commands passed into this command
  String getId ()
          Gets the ID of the command shell
 int getIndexOf ( Object output)
          Get the position of this output object in the command container
  String getName ()
          Gets the name of the command shell or command that is being run.
  Object getOutputAt (int index)
          Get the output object the specified index
  Object[] getRoots ()
           
 int getSize ()
          Return the number of output objects for this command.
abstract   String getTitle ()
           
  String getType ()
          Gets the type of the command shell or command that is being run.
  IRemoteFile getWorkingDirectory ()
          Get the current working directory for this command
abstract  boolean isActive ()
          Indicate whether the corresponding command is running or not
protected  boolean isWindows ()
           
  Object[] listOutput ()
          Get the list of output objects for this command.
 void removeOutput ()
          Remove output from the list of output for this command
 void removeOutput ( Object output)
          Remove output from the list of output for this command
 void setName ( String name)
           
 void setType ( String type)
           
 void setWorkingDirectory ( IRemoteFile file)
          Set the current working directory for this command
 void updateHistory ( String cmd)
           
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_id

protected 
String _id

_name

protected 
String _name

_type

protected 
String _type

_cwd

protected 
IRemoteFile _cwd

_output

protected 
ArrayList _output

_fileSubSystem

protected 
IRemoteFileSubSystem _fileSubSystem

_cmdSubSystem

protected 
IRemoteCmdSubSystem _cmdSubSystem

_cmdHistory

protected 
ArrayList _cmdHistory

_project

protected 
IProject _project
Constructor Detail

RemoteCommandShell

public RemoteCommandShell(
IRemoteCmdSubSystem cmdSubSystem)
Method Detail

setName

public void setName(
String name)

getName

public 
String getName()
Description copied from interface: IRemoteCommandShell
Gets the name of the command shell or command that is being run.

Specified by:
getName in interface IRemoteCommandShell
Returns:
the name of the command

getId

public 
String getId()
Description copied from interface: IRemoteCommandShell
Gets the ID of the command shell

Specified by:
getId in interface IRemoteCommandShell
Returns:
the id

setType

public void setType(
String type)

getType

public 
String getType()
Description copied from interface: IRemoteCommandShell
Gets the type of the command shell or command that is being run. The type may either be a "Shell" or a "Command".

Specified by:
getType in interface IRemoteCommandShell
Returns:
the type of the command

getAdapter

public 
Object getAdapter(
Class adapterType)
Specified by:
getAdapter in interface IAdaptable

listOutput

public 
Object[] listOutput()
Description copied from interface: IRemoteCommandShell
Get the list of output objects for this command.

Specified by:
listOutput in interface IRemoteCommandShell
Returns:
the list of output objects

getIndexOf

public int getIndexOf(
Object output)
Description copied from interface: IRemoteCommandShell
Get the position of this output object in the command container

Specified by:
getIndexOf in interface IRemoteCommandShell

getOutputAt

public 
Object getOutputAt(int index)
Description copied from interface: IRemoteCommandShell
Get the output object the specified index

Specified by:
getOutputAt in interface IRemoteCommandShell

getSize

public int getSize()
Description copied from interface: IRemoteCommandShell
Return the number of output objects for this command.

Specified by:
getSize in interface IRemoteCommandShell
Returns:
the number of output objects

addOutput

public void addOutput(
Object output)
Description copied from interface: IRemoteCommandShell
Add an output object to the list of output for this command

Specified by:
addOutput in interface IRemoteCommandShell
Parameters:
output - the output object to add

removeOutput

public void removeOutput()
Description copied from interface: IRemoteCommandShell
Remove output from the list of output for this command

Specified by:
removeOutput in interface IRemoteCommandShell

removeOutput

public void removeOutput(
Object output)
Description copied from interface: IRemoteCommandShell
Remove output from the list of output for this command

Specified by:
removeOutput in interface IRemoteCommandShell

getFileSubSystem

public 
IRemoteFileSubSystem getFileSubSystem()
Description copied from interface: IRemoteCommandShell
Return the file subsystem associated with this command

Specified by:
getFileSubSystem in interface IRemoteCommandShell
Returns:
the file subsystem associated with this command

getCommandSubSystem

public 
IRemoteCmdSubSystem getCommandSubSystem()
Description copied from interface: IRemoteCommandShell
Return the command subsystem associated with this command

Specified by:
getCommandSubSystem in interface IRemoteCommandShell
Returns:
the command subsystem associated with this command

getRoots

public 
Object[] getRoots()

getTitle

public abstract 
String getTitle()

isActive

public abstract boolean isActive()
Description copied from interface: IRemoteCommandShell
Indicate whether the corresponding command is running or not

Specified by:
isActive in interface IRemoteCommandShell
Returns:
whether the command is running or not

updateHistory

public void updateHistory(
String cmd)
Specified by:
updateHistory in interface IRemoteCommandShell

getHistory

public 
String[] getHistory()
Description copied from interface: IRemoteCommandShell
Return the list of commands passed into this command

Specified by:
getHistory in interface IRemoteCommandShell
Returns:
the list of commands issued

getContext

public 
Object getContext()
Get the current working directory for this command

Specified by:
getContext in interface IRemoteCommandShell
Returns:
the current working directory

getContextString

public 
String getContextString()
Returns the context of this Shell as a String for persistence. The context is typically the current working directory. Returns an empty String if no context can be determined.

Specified by:
getContextString in interface IRemoteCommandShell
Returns:
The current context as String, or an empty String if no context exists. Never returns null.

getWorkingDirectory

public 
IRemoteFile getWorkingDirectory()
Get the current working directory for this command

Returns:
the current working directory

setWorkingDirectory

public void setWorkingDirectory(
IRemoteFile file)
Set the current working directory for this command

Parameters:
file - the working directory.

isWindows

protected boolean isWindows()

getCandidateCommands

public abstract 
ICandidateCommand[] getCandidateCommands()
Override to provide a list of possible commands

Specified by:
getCandidateCommands in interface IRemoteCommandShell
Returns:
the list of possible commands

associateProject

public void associateProject(
IProject project)
Specified by:
associateProject in interface IRemoteCommandShell

getAssociatedProject

public 
IProject getAssociatedProject()
Specified by:
getAssociatedProject in interface IRemoteCommandShell

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire