Package org.eclipse.remote.core
Interface IRemoteConnectionType
-
public interface IRemoteConnectionTypeA remote connection type manages a list of connections that implement the same services. Services may be registered on the individual connections, or at the connection type level for service that apply to all connections of this type.- Since:
- 2.0
- Restriction:
- This interface is not intended to be implemented by clients.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceIRemoteConnectionType.ServiceThe interface that is extend by services provided for this remote services implementation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanAdd()Can you add new connections of this type using the API.booleancanEdit()Can you edit connections of this type, i.e.booleancanRemove()Can you remove connections of this type using the API.IRemoteConnectiongetConnection(String name)Gets the remote connection corresponding to the supplied name.IRemoteConnectiongetConnection(URI uri)Gets the remote connection corresponding to the supplied URI.List<IRemoteConnection>getConnections()Get all the connections for this service provider.List<String>getConnectionServices()Return the list of connection services supported by connections of this type.StringgetId()Get unique ID of this service.StringgetName()Get display name of this service.List<String>getProcessServices()Return the list of process services supported by connections of this type.IRemoteServicesManagergetRemoteServicesManager()Get the remote services manager.StringgetScheme()Get the EFS scheme provided by this service.<T extends IRemoteConnectionType.Service>
TgetService(Class<T> service)Get the service for this remote services implementation that implements the given interface.List<String>getServices()Return the list of connection type services supported by this type.<T extends IRemoteConnection.Service>
booleanhasConnectionService(Class<T> service)Do connections created by this connection type support the given service.<T extends IRemoteProcess.Service>
booleanhasProcessService(Class<T> service)Do processes created by this connection type support the given service.<T extends IRemoteConnectionType.Service>
booleanhasService(Class<T> service)Does this connection type support the given service.IRemoteConnectionWorkingCopynewConnection(String name)Creates a new remote connection named with supplied name.voidremoveConnection(IRemoteConnection connection)Remove a connection and all resources associated with it.
-
-
-
Method Detail
-
getRemoteServicesManager
IRemoteServicesManager getRemoteServicesManager()
Get the remote services manager. This is a convenient way to get back to the root.- Returns:
- remote services manager
-
getId
String getId()
Get unique ID of this service. Can be used as a lookup key.- Returns:
- unique ID
-
getName
String getName()
Get display name of this service.- Returns:
- display name
-
getScheme
String getScheme()
Get the EFS scheme provided by this service.- Returns:
- display name
-
canAdd
boolean canAdd()
Can you add new connections of this type using the API.- Returns:
- can add
-
canEdit
boolean canEdit()
Can you edit connections of this type, i.e. create working copies.- Returns:
- can edit
-
canRemove
boolean canRemove()
Can you remove connections of this type using the API.- Returns:
- can remove
-
getService
<T extends IRemoteConnectionType.Service> T getService(Class<T> service)
Get the service for this remote services implementation that implements the given interface.- Parameters:
service- the interface the required service must implements- Returns:
- the desired service or null if there is no such service available
- Throws:
org.eclipse.core.runtime.CoreException- Since:
- 2.0
-
hasService
<T extends IRemoteConnectionType.Service> boolean hasService(Class<T> service)
Does this connection type support the given service.- Parameters:
service- the service to be tested- Returns:
- true if this connection type supports this service
-
getServices
List<String> getServices()
Return the list of connection type services supported by this type.- Returns:
- connection type services
-
hasConnectionService
<T extends IRemoteConnection.Service> boolean hasConnectionService(Class<T> service)
Do connections created by this connection type support the given service.- Parameters:
service- the service to be tested- Returns:
- true if connections created by this connection type support this service
-
getConnectionServices
List<String> getConnectionServices()
Return the list of connection services supported by connections of this type.- Returns:
- connection services
-
hasProcessService
<T extends IRemoteProcess.Service> boolean hasProcessService(Class<T> service)
Do processes created by this connection type support the given service.- Parameters:
service- the service to be tested- Returns:
- true if processes created by this connection type support this service
-
getProcessServices
List<String> getProcessServices()
Return the list of process services supported by connections of this type.- Returns:
- process services
-
getConnection
IRemoteConnection getConnection(String name)
Gets the remote connection corresponding to the supplied name.- Parameters:
name- name of the connection (as returned byIRemoteConnection.getName())- Returns:
- remote connection or null if no connection exists
-
getConnection
IRemoteConnection getConnection(URI uri)
Gets the remote connection corresponding to the supplied URI.- Parameters:
uri- URI containing a schema for this remote connection- Returns:
- remote connection or null if no connection exists or the schema is incorrect
- Since:
- 4.0
-
getConnections
List<IRemoteConnection> getConnections()
Get all the connections for this service provider.- Returns:
- connections that we know about
-
newConnection
IRemoteConnectionWorkingCopy newConnection(String name) throws RemoteConnectionException
Creates a new remote connection named with supplied name. The connection attributes will be the default for the implementation. Returns a working copy of the remote connection. Callers must callIRemoteConnectionWorkingCopy.save()before the connection can be used.- Parameters:
name- name of the connection- Returns:
- a new connection working copy with the supplied name
- Throws:
RemoteConnectionException- if connection creation failed- Since:
- 5.0
-
removeConnection
void removeConnection(IRemoteConnection connection) throws RemoteConnectionException
Remove a connection and all resources associated with it.- Parameters:
connection- connection to remove- Throws:
RemoteConnectionException- if the connection could not be removed
-
-