|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IServerObjectAdmin
Provides access to members that administer the ArcGIS server.
IServerObjectAdmin provides methods to retrieve server configuration information and to administer the ArcGIS Server.
The IServerObjectAdmin interface can be obtained by a call to GISServerConnection.ServerObjectAdmin.
Any application that runs as a user account in the agsadmin user group on the ArcGIS Server can use the IGISServerConnection interface to connect to the ArcGIS Server and to get a reference to the ServerObjectAdmin. If the user account is not part of the agsadmin user group, the ServerObjectAdmin property on IServerConnection will return an error. Applications that are running as accounts that can connect to the server but are not part of the agsadmin user group can use the ServerObjectManager property on IGISServerConnection to get a reference on the ServerObjectManager.
The IServerObjectAdmin interface has the necessary methods for an application to adminstrate both the set of server object configurations and types associated with the server, and to administer aspects of the server itself. The following administration functionality of the ArcGIS Server is exposed by methods and properties on IServerObjectAdmin:
Adminster server object configurations:
Administer aspects of the server itself:
Use the IServerObjectAmin interface when your application connects to the ArcGIS Server to administer the server's set of server object configurations and server object types, and for administering aspects of the server itself, such as the list of machines that may host server objects.
If your application is connecting to the server to make use of objects in the server, use the IServerObjectManager interface.
Method Summary | |
---|---|
void |
addConfiguration(IServerObjectConfiguration config)
Adds a server object configuration (created with CreateConfiguration) to the GIS server. |
void |
addMachine(IServerMachine machine)
Adds a host machine (created with CreateMachine) to the GIS server. |
void |
addServerDirectory(IServerDirectory pSD)
Adds a server directory (created with CreateServerDirectory) to the GIS server. |
IServerObjectConfiguration |
createConfiguration()
Creates a new server object configuration. |
IServerMachine |
createMachine()
Creates a new host machine. |
IServerDirectory |
createServerDirectory()
Creates a new server directory. |
void |
deleteConfiguration(String name,
String typeName)
Deletes a server object configuration from the GIS server. |
void |
deleteMachine(String machineName)
Deletes a host machine from the GIS server, making it unavailable to host server objects. |
void |
deleteServerDirectory(String path)
Deletes a server directory such that its cleanup is no longer managed by the GIS server. |
IServerObjectConfiguration |
getConfiguration(String name,
String typeName)
Get the server object configuration with the specified Name and TypeName. |
IEnumServerObjectConfiguration |
getConfigurations()
An enumerator over all the server object configurations. |
IServerObjectConfigurationStatus |
getConfigurationStatus(String name,
String typeName)
Get the configuration status for a server object configuration with the specified Name and TypeName. |
IServerMachine |
getMachine(String name)
Get the host machine with the specified Name. |
IEnumServerMachine |
getMachines()
An enumerator over all the GIS server's host machines. |
IPropertySet |
getProperties()
The properties for the GIS server. |
IEnumServerDirectory |
getServerDirectories()
An enumerator over the GIS server's output directories. |
IServerDirectory |
getServerDirectory(String path)
Get the server directory with the specified Path. |
IEnumServerObjectType |
getTypes()
An enumerator over all the server object types. |
void |
pauseConfiguration(String name,
String typeName)
Makes the configuration unavailable to clients for processing requests, but does not shut down running instances of server objects, or interrupt requests in progress. |
void |
setProperties(IPropertySet props)
The properties for the GIS server. |
void |
startConfiguration(String name,
String typeName)
Starts a server object configuration and makes it available to clients for processing requests. |
void |
stopConfiguration(String name,
String typeName)
Stops a server object configuration and shuts down any running instances of server objects defined by the configuration. |
void |
updateConfiguration(IServerObjectConfiguration config)
Updates the properties of a server object configuration. |
void |
updateMachine(IServerMachine machine)
Updates the properties of a host machine. |
void |
updateServerDirectory(IServerDirectory pSD)
Updates the properties of a server directory. |
Method Detail |
---|
IServerDirectory createServerDirectory() throws IOException, AutomationException
Both server objects and server applications typically need to write either temporary data or result data to some location in order for it to be delivered to, or presented to the end user. For example, a map server object's ExportMapImage method can create a image file which is then displayed on a web applicaiton. These files are typically transient and temporary by nature. For example, when a map server write's an image to satisfy a request from a web application, that image is needed only for the time it takes to display it on the web application. An application that creates check out personal geodatabases for download would provide a finite amount of time between which that geodatabase is created and when it can be downloaded.
Because server applications support many user sessions, these output files can accumulate and need to be periodically cleaned up. The server provides the cabability to automatically cleanup these output files if they are written to one of the server's output directories.
Use the CreateServerDirectory method to create a new server directory that you can pass as an argument to the AddServerDirectory method to add new server directories to your GIS Server. Once you have added the server directory, you can configure your server objects and server applications to make use of the server directory.
Note: server directories must be accessible by all host machines configured in the GIS server.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addServerDirectory(IServerDirectory pSD) throws IOException, AutomationException
Both server objects and server applications typically need to write either temporary data or result data to some location in order for it to be delivered to, or presented to the end user. For example, a map server object's ExportMapImage method can create a image file which is then displayed on a web applicaiton. These files are typically transient and temporary by nature. For example, when a map server write's an image to satisfy a request from a web application, that image is needed only for the time it takes to display it on the web application. An application that creates check out personal geodatabases for download would provide a finite amount of time between which that geodatabase is created and when it can be downloaded.
Because server applications support many user sessions, these output files can accumulate and need to be periodically cleaned up. The server provides the cabability to automatically cleanup these output files if they are written to one of the server's output directories.
Use the CreateServerDirectory method to create a new server directory that you can pass as an argument to the AddServerDirectory method to add new server directories to your GIS Server. Once you have added the server directory, you can configure your server objects and server applications to make use of the server directory.
Note: server directories must be accessible by all host machines configured in the GIS server.
pSD
- A reference to a com.esri.arcgis.server.IServerDirectory (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void updateServerDirectory(IServerDirectory pSD) throws IOException, AutomationException
The UpdateServerDirectory method will update the ServerDirectory that is specified when the method is called. You can use the GetServerDirectory or GetServerDirectories methods on IServerObjectAdmin to get a reference to the ServerDirectory you want to update.
The UpdateServerDirectory is useful for modifying the cleanup mode (CleaningMode ) and cleanup schedule.
Note: server directories must be accessible by all host machines configured in the GIS server.
pSD
- A reference to a com.esri.arcgis.server.IServerDirectory (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void deleteServerDirectory(String path) throws IOException, AutomationException
The DeleteServerDirectory method removes a directory from the set of directories managed by the GIS server. The DeleteServerDirectory method will not affect the physical directory.
When a server directory is removed with this method, the GIS Server will not longer manage the cleanup of output files written to that directory. Applicaitons or server objects that are configured to write their output to the physical directory that is referenced by the server directory will continue to work, but the files they write will not be cleaned up by the server.
path
- The path (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IServerDirectory getServerDirectory(String path) throws IOException, AutomationException
The GetServerDirectory method returns the IServerDirectory interface on the ServerDirectory whose path is specified. Once you have a reference to the ServerDirectory, you can get and set its properties, and use it as input the UpdateServerDirectery method.
path
- The path (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEnumServerDirectory getServerDirectories() throws IOException, AutomationException
Both server objects and server applicaitons typically need to write either temporary data or result data to some location in order for it to be delivered to, or presented to the end user. For example, a map server object's ExportMapImage method can create a image file which is then displayed on a web applicaiton. These files are typically transient and temporary by nature. For example, when a map server writes an image to satisfy a request from a web application, that image is needed only for the time it takes to display it on the web application. An application that creates check out personal geodatabases for download would provide a finite amount of time between which that geodatabase is created and when it can be downloaded.
Because server applications support many user sessions, these output files can accumulate and need to be periodically cleaned up. The server provides the cabability to automatically cleanup these output files if they are written to one of the server's output directories.
The GetServerDirectories method returns a enumeration of all the server directories that are managed by the server.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IServerObjectConfiguration createConfiguration() throws IOException, AutomationException
The CreateConfiguration method will create a new ServerObjectConfiguration that you can add to your ArcGIS Server. The CreateConfiguration method returns the IServerObjectConfiguration interface on the new ServerObjectConfiguration. Use the IServerObjectConfiguration interface to set the various properties of the configuration, then use the AddConfiguration method on IServerObjectAdmin to add the new configuration to the ArcGIS Server.
Once a configuration is added to the server, you can use the StartConfiguration and EnableConfiguration to make it available for applications to use.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addConfiguration(IServerObjectConfiguration config) throws IOException, AutomationException
The AddConfiguration method will add a ServerObjectConfiguration to your ArcGIS Server. A new ServerObjectConfiguration can be created using the CreateConfiguration method. Use the IServerObjectConfiguration interface to set the various properties of the configuration, then use the AddConfiguration method on IServerObjectAdmin to add the new configuration to the ArcGIS Server.
Once a configuration is added to the server, you can use StartConfiguration to make it available for applications to use.
config
- A reference to a com.esri.arcgis.server.IServerObjectConfiguration (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IServerObjectConfiguration getConfiguration(String name, String typeName) throws IOException, AutomationException
The GetConfiguration method returns the IServerObjectConfiguration interface on the ServerObjectConfiguration specified by name and type. Once you have a reference to the ServerObjectConfiguration, you can get and set its properties, and use it as input the UpdateConfiguration method.
name
- The name (in)typeName
- The typeName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void updateConfiguration(IServerObjectConfiguration config) throws IOException, AutomationException
The UpdateConfiguration method will update the ServerObjectConfiguration that is specified when the method is called. You can use the GetConfiguration or GetConfigurations methods on IServerObjectAdmin to get a reference to the ServerObjectConfiguration you want to update.
Note that the server object configuration must be stopped before you call UpdateConfiguration. You can use StopConfiguration to stop the server object configuration.
config
- A reference to a com.esri.arcgis.server.IServerObjectConfiguration (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void deleteConfiguration(String name, String typeName) throws IOException, AutomationException
Use DeleteConfiguration to delete a server object configuration from you GIS Server. Note, in order to call DeleteConfiguration, the server object configuration must be stopped. If it is not stopped, then DeleteConfiguration will return an error.
name
- The name (in)typeName
- The typeName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEnumServerObjectConfiguration getConfigurations() throws IOException, AutomationException
GetConfigurations returns an enumeration (IEnumServerObjectConfiguration) of IServerObjectConfiguration for configurations of any esriConfigurationStatus from all folders.
These Info objects provide information about the server object configurations and types that are required to make use of them in an application.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IServerObjectConfigurationStatus getConfigurationStatus(String name, String typeName) throws IOException, AutomationException
The GetConfigurationStatus method will return the IServerObjectConfigurationStatus interface on a particular server object configuration. This interface provides information as to the number of instances of that configuration that are running, and the number in use. It provides information as to the startup status of the configuration.
You can use this interface to monitor server object configuration usage. For example, you can use the InstanceInUseCount to determine if any instances of the configuration are in use before stopping the configuration.
name
- The name (in)typeName
- The typeName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEnumServerObjectType getTypes() throws IOException, AutomationException
The GetTypes methid returns an enumeration of the server object types that are installed in the GIS Server. By default, the MapServer and GeocodeServer object types are installed in the server.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void startConfiguration(String name, String typeName) throws IOException, AutomationException
The start configuration method will start the server object configuration and make it available for use by clients. When a server object configuration is started, if it is a pooled configuration, the minimum number of server objects as described by the configuration will be pre-loaded. The StartConfiguration method will complete only when all the server object instances have been created to satisfy the minimum.
name
- The name (in)typeName
- The typeName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void stopConfiguration(String name, String typeName) throws IOException, AutomationException
The StopConfiguration method stops a server object configuration. Stopping a server object configuration both makes the server object configuration unusable by clients (calls to CreateServerObject referencing the configuration will fail), and it also shuts down any of the confiuration's running server objects. If any of those objects are in use and executing requests, they will be interupted and shut down.
You should stop a configuration when you need to change its properties (such as pooling model or recycling model). Use the StartConfiguration method to re-start the configuration.
If you want to stop the confuguration without interupting clients which are making use of server objects, you can pause the configuration using PauseConfiguration and wait until such a time that all server object usage has ended, then call StopConfiguration to stop the configuration.
name
- The name (in)typeName
- The typeName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void pauseConfiguration(String name, String typeName) throws IOException, AutomationException
The PauseConfiguration method will pause the server object configuration. Pausing the configuration does not interupt any requests that are being executed by instances of server objects managed by that configuration. A paused server object, hevever, will refuse future requests.
You should pause server objects if you want to lock requests from being processed, but you want requests in process to complete. Once all objects are not longer in use, you can perform necessary operations (such as database maintenance, stopping the server object configuration to changes properties, etc). Use the GetConfigurationStatus and IServerObjectConfigurationStatus to determine if any server objects are in use.
Use the StartConfiguration method to resume the server object configuration.
name
- The name (in)typeName
- The typeName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IServerMachine createMachine() throws IOException, AutomationException
ArcGIS Server is a distributed system. Server objects managed by the GIS server run on one or more host machines. A machine that can host server objects must have the Server Object Container installed on it, and the machine must be added to the list of host machines managed by the Server Object Manager (SOM).
Use the CreateMachine method to create a new server machine that you can pass as an argument to the AddMachine method to add new host machines to your GIS server.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addMachine(IServerMachine machine) throws IOException, AutomationException
ArcGIS Server is a distributed system. Server objects managed by the GIS server run on one or more host machines. A machine that can host server objects must have the Server Object Container installed on it, and the machine must be added to the list of host machines managed by the Server Object Manager (SOM).
Use the AddMachine method to add new host machines to your GIS server. Once a machine has been added to the GIS server, as new server object instances are created, the SOM will make use of the new machine.
machine
- A reference to a com.esri.arcgis.server.IServerMachine (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEnumServerMachine getMachines() throws IOException, AutomationException
A server object configuration can be configured such that its server objects run on one or more host machines that have been added to the ArcGIS Server. Use the GetMachines method to get the names of the machines that have been added to the server to host server objects.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void deleteMachine(String machineName) throws IOException, AutomationException
The DeleteMachine method removes a machine from the machines that can host server objects for the GIS server. When you delete a machine, any instances of server objects that are running on that machine will be shut down and replaced with instances running on the GIS server's other host machines.
machineName
- The machineName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IServerMachine getMachine(String name) throws IOException, AutomationException
The GetMachine method returns the IServerMachine interface on the ServerMachine whoes name is specified. Once you have a reference to the ServerMachine, you can get and set its description, and use it as input the UpdateMachine method.
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void updateMachine(IServerMachine machine) throws IOException, AutomationException
The UpdateMachine method will update the host machine that is specified when the method is called. You can use the GetMachine or GetMachines methods on IServerObjectAdmin to get a reference to the machine you want to update.
The UpdateMachine is useful for modifying the machine's description.
machine
- A reference to a com.esri.arcgis.server.IServerMachine (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IPropertySet getProperties() throws IOException, AutomationException
The Properties property on IServerObjectAdmin returns the logging properties for the GIS server. The properties are for the GIS server's logging, and for server object creation timeout.
The GIS server logs its activity, including server object configuration sartup, shutdown, server context creation and shutdown, as well as errors generated through any failed operation or request in the GIS server.
You can control the logging properties through the PropertySet returned by Properties. The following is a description of the logging properties:
LogPath: this is the path to the location on disk that log files are writeen. By default, the LogPath is <install location>\log
LogSize: this is the size to which a single log file can graw (in MB) before a new logfile is created. By default, the LogSize is 10
LogLevel: this is a number between 0 and 5 which indicates the level of detail that the server logs. By default, the LogLevel is 3. The following is a description of the each log level:
All aspects of logging can be changed when the GIS server is running. When they are changed, the server will immediatly use the new logging settings.
Server object creation may hang for a variety of reasons. To prevent this from adversly affecting the GIS server, it has a ConfigurationStartTimeout property which defines the maximim time in seconds a server object instance has to initialize itself before its creation is cancelled.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setProperties(IPropertySet props) throws IOException, AutomationException
props
- A reference to a com.esri.arcgis.system.IPropertySet (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |