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.services.terminals
Class AbstractDelegatingTerminalService


java.lang.Object
  extended by 

org.eclipse.core.runtime.PlatformObject
      extended by 

org.eclipse.rse.services.AbstractService
          extended by 

org.eclipse.rse.services.terminals.AbstractTerminalService
              extended by 
org.eclipse.rse.services.terminals.AbstractDelegatingTerminalService
All Implemented Interfaces:
IAdaptable, IService, ITerminalService

public abstract class AbstractDelegatingTerminalService
extends AbstractTerminalService

Base class that can be used for decorating an existing terminal service with additional functionality. By default, all method calls are passed through to the original service.

Since:
3.1

Constructor Summary
AbstractDelegatingTerminalService ()
           
 
Method Summary
  Object getAdapter ( Class adapter)
           
  String getDescription ()
          Get the description of this Service as a translated, UI-visible String.
  String getName ()
          Get the name of this Service as a translated, UI-visible String.
abstract   ITerminalService getRealTerminalService ()
           
 void initService ( IProgressMonitor monitor)
          Default implementation of initService.
  ITerminalShell launchTerminal ( String ptyType, String encoding, String[] environment, String initialWorkingDirectory, String commandToRun, IProgressMonitor monitor)
          Launch a new terminal connection, also known as shell session with Streams.
 void uninitService ( IProgressMonitor monitor)
          Default implementation of uninitService.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDelegatingTerminalService

public AbstractDelegatingTerminalService()
Method Detail

getRealTerminalService

public abstract 
ITerminalService getRealTerminalService()

launchTerminal

public 
ITerminalShell launchTerminal(
String ptyType,
                                     
String encoding,
                                     
String[] environment,
                                     
String initialWorkingDirectory,
                                     
String commandToRun,
                                     
IProgressMonitor monitor)
                              throws 
SystemMessageException
Description copied from interface: ITerminalService
Launch a new terminal connection, also known as shell session with Streams.

Parameters:
ptyType - requested terminal type for the new Terminal. Since not all Terminal implementations support specifying the Terminal Type, there is no guarantee that a particular setting has any effect. Use null to fall back to a default terminal type.
encoding - Stream encoding to use for sending initial working directory and initial commandToRun, and to return on ITerminalShell.getDefaultEncoding() request. Use null to fall back to a default encoding. The Terminal Service will make efforts to determine a proper default encoding on the remote side but this is not guaranteed to be correct.
environment - Array of environment variable Strings of the form "var=text". Since not all terminal implementations support the passing of environment variables, there is no guarantee that the created shell will actually have the specified environment set. Passing null is allowed in order to specify that no specific environment needs to be passed.
initialWorkingDirectory - initial working directory or empty String ("") if not relevant. The remote shell will launch in a directory of its own choice in that case (typically a user's home directory).
commandToRun - initial command to send to the remote side.
monitor - Progress Monitor for monitoring and cancellation during connection creation.
Returns:
the terminal connection object. Note that the connection may not actually be usable in case the remote side allows opening a channel but immediately closes it again. In this case, IBaseShell.getInputStream() will throw an exception or be closed from the very beginning.
Throws:
SystemMessageException - in case an error occurred or the user chose to cancel the operation via the progress monitor.

getDescription

public 
String getDescription()
Description copied from interface: IService
Get the description of this Service as a translated, UI-visible String. Extenders are expected to override this method.

Specified by:
getDescription in interface IService
Overrides:
getDescription in class AbstractService
Returns:
the description of this Service.

getName

public 
String getName()
Description copied from interface: IService
Get the name of this Service as a translated, UI-visible String. Extenders are expected to override this method.

Specified by:
getName in interface IService
Overrides:
getName in class AbstractService
Returns:
the name of this Service.

initService

public void initService(
IProgressMonitor monitor)
                 throws 
SystemMessageException
Description copied from class: AbstractService
Default implementation of initService. Extenders who override this method must call super.initService(monitor) as the first call in their implementation.

Specified by:
initService in interface IService
Overrides:
initService in class AbstractService
Parameters:
monitor - A progress monitor to provide progress of long-running operation. There is no guarantee that cancellation is actually supported by a Service since it would leave the service in a potentially inconsistent, partially initialized state.
Throws:
SystemMessageException - if an error occurs during initialization.

uninitService

public void uninitService(
IProgressMonitor monitor)
Description copied from class: AbstractService
Default implementation of uninitService. Extenders who override this method must call super.uninitService(monitor) as the last call in their implementation.

Specified by:
uninitService in interface IService
Overrides:
uninitService in class AbstractService
Parameters:
monitor - A progress monitor to provide progress of long-running operation. There is no guarantee that cancellation is actually supported by a Service since it would leave the service in a potentially inconsistent, partially initialized state.

getAdapter

public 
Object getAdapter(
Class adapter)
Specified by:
getAdapter in interface IAdaptable
Overrides:
getAdapter in class PlatformObject

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