Package org.eclipse.remote.core

# Interface IRemoteResource

public interface IRemoteResource
Abstraction of a remote resource. There are currently two types of remote resources: fully remote and synchronized. This interface provides a common mechanism for accessing resource information from either type. Usage: `IRemoteResource remoteRes = (IRemoteResource)resource.getAdapter(IRemoteResource.class); if (remoteRes != null) { URI location = remoteRes.getDefaultLocationURI(); ... }`

Since:
  6.0

## Method Summary

Modifier and Type
Method
Description
`URI`
`getActiveLocationURI()`
Get the active location URI of the resource in the remote project.
`org.eclipse.core.resources.IResource`
`getResource()`
Get the platform resource corresponding to the remote resource
`void`
`refresh(org.eclipse.core.runtime.IProgressMonitor monitor)`
Synchronize the resource with the underlying filesystem.
`void`
`setResource(org.eclipse.core.resources.IResource resource)`
Set the platform resource

## Method Details

### getActiveLocationURI

URI getActiveLocationURI()
Get the active location URI of the resource in the remote project. Returns null if the URI can't be obtained (@see `IResource.getLocationURI()`). For fully remote projects, this is just the URI of the remote resource. For synchronized projects, this is the URI of the resource from the active synchronization target.

Returns:
  URI or null if URI can't be obtained

### getResource

org.eclipse.core.resources.IResource getResource()
Get the platform resource corresponding to the remote resource

Returns:
  IResource

### refresh

void refresh(org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
Synchronize the resource with the underlying filesystem. Performs a refresh for local and remote projects, but causes synchronized projects to attempt to synchronize with their remote files. May synchronize more than just the single resource. Blocks until the refresh has completed, so callers should use a job if necessary.

Parameters:
  `monitor` - progress monitor to cancel refresh
Throws:
  `org.eclipse.core.runtime.CoreException` - if the underlying synchronization fails

### setResource

void setResource(org.eclipse.core.resources.IResource resource)
Set the platform resource

Parameters:
  `resource` - platform resource corresponding to this remote resource