PTP
Release 7.0

org.eclipse.ptp.remote.core
Interface IRemoteServices

All Superinterfaces:
IRemoteServicesDescriptor
All Known Implementing Classes:
AbstractRemoteServices

public interface IRemoteServices
extends IRemoteServicesDescriptor

Abstraction of a remote services provider. Clients obtain this interface using one of the static methods in RemoteServices. The methods on this interface can then be used to access the full range of remote services provided.


Method Summary
 IRemoteProcess getCommandShell(IRemoteConnection conn, int flags)
          Get a remote process that runs a command shell on the remote system.
 IRemoteConnectionManager getConnectionManager()
          Get a connection manager for managing remote connections.
 IRemoteFileManager getFileManager(IRemoteConnection conn)
          Get a file manager for managing remote files
 IRemoteProcessBuilder getProcessBuilder(IRemoteConnection conn, List<String> command)
          Get a process builder for creating remote processes
 IRemoteProcessBuilder getProcessBuilder(IRemoteConnection conn, String... command)
          Get a process builder for creating remote processes
 boolean initialize(IProgressMonitor monitor)
          Initialize the remote service.
 
Methods inherited from interface org.eclipse.ptp.remote.core.IRemoteServicesDescriptor
canCreateConnections, getId, getName, getScheme
 

Method Detail

getConnectionManager

IRemoteConnectionManager getConnectionManager()
Get a connection manager for managing remote connections.

Returns:
connection manager or null if services are not initialized

getFileManager

IRemoteFileManager getFileManager(IRemoteConnection conn)
Get a file manager for managing remote files

Parameters:
conn - connection to use for managing files
Returns:
file manager or null if services are not initialized

getProcessBuilder

IRemoteProcessBuilder getProcessBuilder(IRemoteConnection conn,
                                        List<String> command)
Get a process builder for creating remote processes

Parameters:
conn - connection to use for creating remote processes
Returns:
process builder or null if services are not initialized

getProcessBuilder

IRemoteProcessBuilder getProcessBuilder(IRemoteConnection conn,
                                        String... command)
Get a process builder for creating remote processes

Parameters:
conn - connection to use for creating remote processes
Returns:
process builder or null if services are not initialized

getCommandShell

IRemoteProcess getCommandShell(IRemoteConnection conn,
                               int flags)
                               throws IOException
Get a remote process that runs a command shell on the remote system. The shell will be the user's default shell on the remote system. The flags may be used to modify behavior of the remote process. These flags may only be supported by specific types of remote service providers. Clients can use IRemoteProcessBuilder.getSupportedFlags() to find out the flags supported by the service provider.
 Current flags are:
   IRemoteProcessBuilder.NONE                        - disable any flags
   IRemoteProcessBuilder.ALLOCATE_PTY        - allocate a pseudo-terminal for the process (RFC-4254 Sec. 6.2)
   IRemoteProcessBuilder.FORWARD_X11        - enable X11 forwarding (RFC-4254 Sec. 6.3)
 

Parameters:
conn - connection used for creating the remote process
flags - bitwise-or of flags
Returns:
remote process object
Throws:
IOException
Since:
7.0

initialize

boolean initialize(IProgressMonitor monitor)
Initialize the remote service. Clients should not call this method (it is called internally.)

Returns:
true if the initialization was successful, false otherwise
Since:
7.0

PTP
Release 7.0

Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.