com.esri.arcgis.server
Class ServerDirectory

java.lang.Object
  extended by com.esri.arcgis.server.ServerDirectory
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, IServerDirectory, IServerDirectory2, Serializable

public class ServerDirectory
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IServerDirectory, IServerDirectory2

The ServerDirectory object which provides information about the ServerDirectory.

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.

ServerDirectory supports a single interface: IServerDirectory.

You can create a ServerDirectory using the CreateServerDirectory method on IServerObjectAdmin.

You can get the server direcrtories configured for a GIS server using GetServerDirectory and GetServerDirectories on IServerObjectAdmin.

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
ServerDirectory(Object obj)
          Construct a ServerDirectory 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 server 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
 void setCleaningMode(int pMode)
          The mode by which the files in the server directory are cleaned (by age, by size or none).
 void setDescription(String pText)
          The description of the server directory.
 void setMaxFileAge(int pAge)
          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.
 void setPath(String pPath)
          The path of the server directory.
 void setType(int pType)
          The Type of server directory.
 void setURL(String pUrl)
          The URL of the virtual directory that maps to the physical directory as described by the Path property.
 
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

ServerDirectory

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

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

Throws:
IOException - if there are interop problems ServerDirectory theServerDirectory = (ServerDirectory) 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 server directory.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setPath

public void setPath(String pPath)
             throws IOException,
                    AutomationException
The path of the server directory.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setPath in interface IServerDirectory
Parameters:
pPath - The pPath (in)
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.

Remarks

The URL is a virtual directory for the pysical directory specified by the Name property.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setURL

public void setURL(String pUrl)
            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:
setURL in interface IServerDirectory
Parameters:
pUrl - The pUrl (in)
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 IServerDirectory
Returns:
The pText
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDescription

public void setDescription(String pText)
                    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:
setDescription in interface IServerDirectory
Parameters:
pText - The pText (in)
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 IServerDirectory
Returns:
A com.esri.arcgis.server.esriServerDirectoryCleaningMode constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCleaningMode

public void setCleaningMode(int pMode)
                     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:
setCleaningMode in interface IServerDirectory
Parameters:
pMode - A com.esri.arcgis.server.esriServerDirectoryCleaningMode constant (in)
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 specified in seconds.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setMaxFileAge

public void setMaxFileAge(int pAge)
                   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.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setMaxFileAge in interface IServerDirectory
Parameters:
pAge - The pAge (in)
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 IServerDirectory2
Returns:
A com.esri.arcgis.server.esriServerDirectoryType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setType

public void setType(int pType)
             throws IOException,
                    AutomationException
The Type of server directory.

Product Availability

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

Specified by:
setType in interface IServerDirectory2
Parameters:
pType - A com.esri.arcgis.server.esriServerDirectoryType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.