com.esri.arcgis.geodatabase
Interface IWorkspaceStatus

All Superinterfaces:
Serializable
All Known Implementing Classes:
IWorkspaceStatusProxy

public interface IWorkspaceStatus
extends Serializable

Describes the status of a workspace.

Remarks

The IWorkspaceFactoryStatus::WorkspaceStatus property returns an enumeration of IWorkspaceStatus objects for all currently open workspaces. This property should be used as a course grained object to determine the current status of the workspace connection (esriWCSUp or esriWCSDown). Use IWorkspaceStatus::ConnectionStatus property to determine the status of a particular workspace. The values of esriWorkspaceConnectionStatus returned by the IWorkspaceFactoryStatus::WorkspaceStatus property are:

· esriWCSUp indicates that the workspace is up.

· esriWCSDown indicates that the workspace has lost its connection.

If the status of a workspace connection is esriWCSDown a reconnection can be made to the workspace once the workspace becomes available for reconnection. It is recommended to use the IWorkspaceFactoryStatus::PingWorkspaceStatus method to obtain the current status of the down workspace. If the connection status has changed from esriWCSDown to esriWCSAvailable the IWorkspaceFactoryStatus::OpenAvailableWorkspace method can be used to get a reference to the workspace.

Note that IWorkspaceFactoryStatus::OpenAvailableWorkspace does not repair the original workspace, but provides a mechanism to get a new one when reconnection is possible. It is the responsibility of the application to refresh other objects that rely on the new workspace (for example, opening a feature class from the new workspace and setting it into a feature layer).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 int getConnectionStatus()
          The current connection status of the workspace.
 IWorkspace getWorkspace()
          The workspace this status refers to.
 

Method Detail

getWorkspace

IWorkspace getWorkspace()
                        throws IOException,
                               AutomationException
The workspace this status refers to.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.geodatabase.IWorkspace
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConnectionStatus

int getConnectionStatus()
                        throws IOException,
                               AutomationException
The current connection status of the workspace.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A com.esri.arcgis.geodatabase.esriWorkspaceConnectionStatus constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.