com.esri.arcgis.server
Class ServerDirectoryInfo

java.lang.Object
  extended by com.esri.arcgis.server.ServerDirectoryInfo
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, IServerDirectoryInfo, IServerDirectoryInfo2, Serializable

public class ServerDirectoryInfo
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IServerDirectoryInfo, IServerDirectoryInfo2

The ServerDirectoryInfo object which provides access to properties of a server output directory.

Remarks

A ServerDirectory is a location on a file system that the GIS server is configured to clean up files it writes. By definitition, a server directory can be written to by all container machines.

The GIS server hosts and manages server objects, and other ArcObjects for use in applicaitons. In many cases, the use of those objects requires writing output to files. For example, when a map server object draws a map, it writes images to disk on the server machine. Other appllications may write their own data, for example an application that checks out data from a geodatabase may write the check out personal geodatabase to disk on the server.

Typically, these files are transient and need only be available to the applicaiton for a short time, for example, the time for the application to draw the map, or the time required to download the check out database. As applicaitons do their work and write out data, thes files can accumulate quickly. The GIS server will automatically clean up its output if that output is written to a server directory.

Files in a server directory can be cleaned based on file age, or based on when the file was last accessed. The maximum file age or time since last accessed is a property of a server directory. If the ClenaingMode is esriDCAbsolute, then all files created by the GIS server that are older than the maximum age are automatically cleaned up by the GIS server. If the ClenaingMode is esriDCSliding, then all files created by the GIS server that have not been access for a duration defined by maximum age are automatically cleaned up by the GIS server.

Users and developers who are not administrators also need access to the list of server server directories and the set of their properties that are necessary for programming applications that use them as locations to write output. Users that are members of the agsusers user group, but are not members of the agsadmin user group can get information about server directories using the GetServerDirectoryInfos method on IServerObjectManager to get the IServerDirectoryInfo interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
ServerObjectManager, ServerObjectType, IAGSServerConnectionAdmin, AGSServerConnectionName, IEnumServerObjectType, IEnumServerDirectory, AGSServerConnection, IServerConnection, ServerObjectTypeInfo, IEnumServerObjectTypeInfo, IAGSServerObject, ServerDirectoryInfo, ServerObjectConfiguration, ServerContext, ServerObjectConfigurationStatus, IAGSServerObjectName, ServerConnection, IAGSServerConnectionName, IAGSEnumServerObjectName, ServerObject, IServerObjectConfigurationInfo, IServerObjectAdmin, AGSServerConnectionFactory, IAGSServerConnectionFactory, IEnumServerObjectConfigurationInfo, IGISServerConnection, IAGSServerConnection, IServerContext, ServerDirectory, ServerObjectConfigurationInfo, IEnumServerMachine, ServerMachine, IServerObjectConfiguration, IServerObjectManager, IServerObjectTypeInfo, IServerMachine, IServerObject, IServerObjectType, GISServerConnection, AGSServerObjectName, ServerObjectAdmin, IEnumServerObjectConfiguration, Serialized Form

Constructor Summary
ServerDirectoryInfo(Object obj)
          Construct a ServerDirectoryInfo using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 int getCleaningMode()
          The mode by which the files in the server directory are cleaned (by age, by size or none).
 String getDescription()
          The description of the server directory.
 int getMaxFileAge()
          The maximum age (in seconds) a file can be in the server directory before it is deleted, if the cleaning mode is by file age.
 String getPath()
          The path of the output directory.
 int getType()
          The Type of server directory.
 String getURL()
          The URL of the virtual directory that maps to the physical directory as described by the Path property.
 int hashCode()
          the hashcode for this object
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

ServerDirectoryInfo

public ServerDirectoryInfo(Object obj)
                    throws IOException
Construct a ServerDirectoryInfo using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to ServerDirectoryInfo.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
ServerDirectoryInfo o = (ServerDirectoryInfo)obj; // will not work

ServerDirectoryInfo o = new ServerDirectoryInfo(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server

Throws:
IOException - if there are interop problems ServerDirectoryInfo theServerDirectoryInfo = (ServerDirectoryInfo) obj;
Method Detail

equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getPath

public String getPath()
               throws IOException,
                      AutomationException
The path of the output directory.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getPath in interface IServerDirectoryInfo
Returns:
The pPath
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getURL

public String getURL()
              throws IOException,
                     AutomationException
The URL of the virtual directory that maps to the physical directory as described by the Path property.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getURL in interface IServerDirectoryInfo
Returns:
The pUrl
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDescription

public String getDescription()
                      throws IOException,
                             AutomationException
The description of the server directory.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDescription in interface IServerDirectoryInfo
Returns:
The pText
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCleaningMode

public int getCleaningMode()
                    throws IOException,
                           AutomationException
The mode by which the files in the server directory are cleaned (by age, by size or none).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCleaningMode in interface IServerDirectoryInfo
Returns:
A com.esri.arcgis.server.esriServerDirectoryCleaningMode constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMaxFileAge

public int getMaxFileAge()
                  throws IOException,
                         AutomationException
The maximum age (in seconds) a file can be in the server directory before it is deleted, if the cleaning mode is by file age.

Remarks

MaxFileAge is in seconds.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMaxFileAge in interface IServerDirectoryInfo
Returns:
The pAge
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getType

public int getType()
            throws IOException,
                   AutomationException
The Type of server directory.

Product Availability

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

Specified by:
getType in interface IServerDirectoryInfo2
Returns:
A com.esri.arcgis.server.esriServerDirectoryType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.