public class RemoteConnectionType extends java.lang.Object implements IRemoteConnectionType
IRemoteConnectionType.Service
Constructor and Description |
---|
RemoteConnectionType(org.eclipse.core.runtime.IConfigurationElement ce,
RemoteServicesManager manager) |
Modifier and Type | Method and Description |
---|---|
void |
addService(org.eclipse.core.runtime.IConfigurationElement ce)
Called from the remote service manager to register a service extension for
this remote services implementation
|
boolean |
canAdd()
Can you add new connections of this type using the API.
|
boolean |
canEdit()
Can you edit connections of this type, i.e.
|
boolean |
canRemove()
Can you remove connections of this type using the API.
|
protected void |
connectionAdded(IRemoteConnection connection)
Signal connection has been added.
|
protected void |
connectionRemoved(IRemoteConnection connection)
Signal a connection is about to be removed.
|
IRemoteConnection |
getConnection(java.lang.String name)
Gets the remote connection corresponding to the supplied name.
|
IRemoteConnection |
getConnection(java.net.URI uri)
Gets the remote connection corresponding to the supplied URI.
|
java.util.List<IRemoteConnection> |
getConnections()
Get all the connections for this service provider.
|
<T extends IRemoteConnection.Service> |
getConnectionService(IRemoteConnection connection,
java.lang.Class<T> service)
Called from the connection to get a service object for that connection.
|
java.util.List<java.lang.String> |
getConnectionServices()
Return the list of connection services supported by connections of this type.
|
java.lang.String |
getId()
Get unique ID of this service.
|
java.lang.String |
getName()
Get display name of this service.
|
<T extends IRemoteProcess.Service> |
getProcessService(IRemoteProcess process,
java.lang.Class<T> service)
Called from the remote process to get a service object for that process.
|
java.util.List<java.lang.String> |
getProcessServices()
Return the list of process services supported by connections of this type.
|
IRemoteServicesManager |
getRemoteServicesManager()
Get the remote services manager.
|
java.lang.String |
getScheme()
Get the EFS scheme provided by this service.
|
<T extends IRemoteConnectionType.Service> |
getService(java.lang.Class<T> service)
Get the service for this remote services implementation that implements the given interface.
|
java.util.List<java.lang.String> |
getServices()
Return the list of connection type services supported by this type.
|
<T extends IRemoteConnection.Service> |
hasConnectionService(java.lang.Class<T> service)
Do connections created by this connection type support the given service.
|
<T extends IRemoteProcess.Service> |
hasProcessService(java.lang.Class<T> service)
Do processes created by this connection type support the given service.
|
<T extends IRemoteConnectionType.Service> |
hasService(java.lang.Class<T> service)
Does this connection type support the given service.
|
IRemoteConnectionWorkingCopy |
newConnection(java.lang.String name)
Creates a new remote connection named with supplied name.
|
void |
removeConnection(IRemoteConnection connection)
Remove a connection and all resources associated with it.
|
public RemoteConnectionType(org.eclipse.core.runtime.IConfigurationElement ce, RemoteServicesManager manager)
public IRemoteServicesManager getRemoteServicesManager()
IRemoteConnectionType
getRemoteServicesManager
in interface IRemoteConnectionType
public java.lang.String getId()
IRemoteConnectionType
getId
in interface IRemoteConnectionType
public java.lang.String getName()
IRemoteConnectionType
getName
in interface IRemoteConnectionType
public java.lang.String getScheme()
IRemoteConnectionType
getScheme
in interface IRemoteConnectionType
public boolean canAdd()
IRemoteConnectionType
canAdd
in interface IRemoteConnectionType
public boolean canEdit()
IRemoteConnectionType
canEdit
in interface IRemoteConnectionType
public boolean canRemove()
IRemoteConnectionType
canRemove
in interface IRemoteConnectionType
public <T extends IRemoteConnectionType.Service> T getService(java.lang.Class<T> service)
IRemoteConnectionType
getService
in interface IRemoteConnectionType
service
- the interface the required service must implementspublic java.util.List<java.lang.String> getServices()
IRemoteConnectionType
getServices
in interface IRemoteConnectionType
public <T extends IRemoteConnectionType.Service> boolean hasService(java.lang.Class<T> service)
IRemoteConnectionType
hasService
in interface IRemoteConnectionType
service
- the service to be testedpublic <T extends IRemoteConnection.Service> T getConnectionService(IRemoteConnection connection, java.lang.Class<T> service)
connection
- the connection to which the service appliesservice
- the interface the service must implementorg.eclipse.core.runtime.CoreException
public java.util.List<java.lang.String> getConnectionServices()
IRemoteConnectionType
getConnectionServices
in interface IRemoteConnectionType
public <T extends IRemoteConnection.Service> boolean hasConnectionService(java.lang.Class<T> service)
IRemoteConnectionType
hasConnectionService
in interface IRemoteConnectionType
service
- the service to be testedpublic <T extends IRemoteProcess.Service> T getProcessService(IRemoteProcess process, java.lang.Class<T> service)
process
- the process to which the service appliesservice
- the interface the service must implementorg.eclipse.core.runtime.CoreException
public java.util.List<java.lang.String> getProcessServices()
IRemoteConnectionType
getProcessServices
in interface IRemoteConnectionType
public <T extends IRemoteProcess.Service> boolean hasProcessService(java.lang.Class<T> service)
IRemoteConnectionType
hasProcessService
in interface IRemoteConnectionType
service
- the service to be testedpublic void addService(org.eclipse.core.runtime.IConfigurationElement ce)
ce
- the extension element defining the serviceprotected void connectionAdded(IRemoteConnection connection)
protected void connectionRemoved(IRemoteConnection connection)
public IRemoteConnection getConnection(java.lang.String name)
IRemoteConnectionType
getConnection
in interface IRemoteConnectionType
name
- name of the connection (as returned by IRemoteConnection.getName()
)public IRemoteConnection getConnection(java.net.URI uri)
IRemoteConnectionType
getConnection
in interface IRemoteConnectionType
uri
- URI containing a schema for this remote connectionpublic java.util.List<IRemoteConnection> getConnections()
IRemoteConnectionType
getConnections
in interface IRemoteConnectionType
public IRemoteConnectionWorkingCopy newConnection(java.lang.String name) throws RemoteConnectionException
IRemoteConnectionType
IRemoteConnectionWorkingCopy.save()
before the
connection can be used.newConnection
in interface IRemoteConnectionType
name
- name of the connectionRemoteConnectionException
- if connection creation failedpublic void removeConnection(IRemoteConnection connection) throws RemoteConnectionException
IRemoteConnectionType
removeConnection
in interface IRemoteConnectionType
connection
- connection to removeRemoteConnectionException
- if the connection could not be removed