Item Property (ServerManager collection)



The read-only Item property retrieves a Server from the ServerManager collection by name or creates and returns a new Server object for the current trusted user.  The server name must be from the Known Servers Table on the machine where the object is created.  The call is only successful if the current logged in caller can be validated against the desired server.  Currently this means the user must have a valid entry in the PITrust table for the desired server.  




The Item property syntax has these parts:




An object expression that evaluates to a ServerManager collection.


A string that specifies the server name 



The Item property is the default property of the collection.

Server objects retrieved by this call are already open and typically have cached information in the Server object and its children in the PI-SDK hierarchy.  If required this information may be updated using the IRefresh interface for objects in the hierarchy.  It is unnecessary to call Close on these Server objects as they remain open for the next user. 

This call will currently only retrieve servers that are of version PI3.3 or higher and run under Windows NT or Windows 2000.

If the passed index is not found, the Server.Aliases table is consulted.  Aliases may be added programmatically or through the Connection Manager.  When Collective Servers are added and the first connection is made, aliases for all the collective members are added.  This allows applications which have persisted names of individual servers in displays, spreadsheets and reports to continue to access the server when if it becomes a collective and the collective name is not identical.

As with the Servers collection, the string index can use a prefix of ? to indicate that the following characters are a ServerID.  This allows obtaining a server from the ServerID if that is what is persisted or known.  Alternate ServerIDs can also be added to the Aliases table and are checked when this prefix is used.


Starting with version 1.3.6, if none of the methods above locate the desired server, this method will attempt to add a new server to the Known Servers Table using the passed index as the name and the path.  Before proceeding it verifies that the passed index can be translated into a valid IP address and then attempts a trust connection. If the connection succeeds the newly added server becomes part of the Known Servers Table and the connected Server object is returned.  If the connection fails the server is not added and an error is returned.   These new default behaviors (adding a server automatically, AutoAdd, and checking its IP, checkIP) can be turned off, temporarily or permanently using the IPISDKOptions interface of the PISDK object under the DirectoryOptions methods. Attempts to automatically add the requested server are throttled to avoid delays when an application is repeatedly trying to address the same server which can't be resolved.  



Enabling Operational Intelligence