|
RSE Release 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.runtime.PlatformObject
org.eclipse.rse.services.AbstractService
org.eclipse.rse.services.terminals.AbstractTerminalService
org.eclipse.rse.services.terminals.AbstractDelegatingTerminalService
public abstract class AbstractDelegatingTerminalService
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.
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 |
---|
public AbstractDelegatingTerminalService()
Method Detail |
---|
public abstract ITerminalService getRealTerminalService()
public ITerminalShell launchTerminal(String ptyType, String encoding, String[] environment, String initialWorkingDirectory, String commandToRun, IProgressMonitor monitor) throws SystemMessageException
ITerminalService
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.
IBaseShell.getInputStream()
will throw an
exception or be closed from the very beginning.
SystemMessageException
- in case an error occurred or the user
chose to cancel the operation via the progress monitor.public String getDescription()
IService
getDescription
in interface IService
getDescription
in class AbstractService
public String getName()
IService
getName
in interface IService
getName
in class AbstractService
public void initService(IProgressMonitor monitor) throws SystemMessageException
AbstractService
super.initService(monitor)
as the first call in
their implementation.
initService
in interface IService
initService
in class AbstractService
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.
SystemMessageException
- if an error occurs during initialization.public void uninitService(IProgressMonitor monitor)
AbstractService
super.uninitService(monitor)
as the last
call in their implementation.
uninitService
in interface IService
uninitService
in class AbstractService
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.public Object getAdapter(Class adapter)
getAdapter
in interface IAdaptable
getAdapter
in class PlatformObject
|
RSE Release 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |