com.esri.arcgis.server
Class ServerContext

java.lang.Object
  extended by com.esri.arcgis.server.ServerContext
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, IServerContext, Serializable

public class ServerContext
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IServerContext

COM Class 'ServerContext'. Generated 7/9/2008 10:23:11 AM from 'C:\ArcGIS\Java\JavaEngine\buildoutput\olb\esriServer.olb'

Generated using ArcGIS Proxy Generator

Description 'The ServerContext object used for working with ArcObjects in the GIS server.' Generator Options: PromptForTypeLibraries = False ClashPrefix = esri_ LowerCaseMemberNames = True IDispatchOnly = False RetryOnReject = False AwtForOcxs = True ArraysAsObjects = False DontRenameSameMethods = False ImplementConflictingInterfaces = True ReuseMethods = True RenameConflictingInterfaceMethods = True GenBeanInfo = True GenerateJavadoc =

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.esri.arcgis.server.IServerContext
IID, IIDa87fdd99_6112_410c_b75e_fefff5eace35, xxDummy
 
Constructor Summary
ServerContext(Object obj)
          Construct a ServerContext using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 Object createObject(Class classDef)
          Create an instance of an ArcGIS Java extension in the server context whose class definition is specified by classDef.
 Object createObject(String cLSID)
          Create an object in the server context whose type is specified by the CLSID.
 boolean equals(Object o)
          Compare this object with another
 com.esri.arcgis.interop.Dispatch getJintegraDispatch()
          Deprecated. Internal use only.
 Object getObject(String name)
          Get a reference to an object in the server context's object dictionary by its Name.
 IServerObject getServerObject()
          The map or geocode server object running in the server context.
 int hashCode()
          the hashcode for this object
 Object loadObject(String str)
          Create an object in the server context from a string that was created by saving an object using SaveObject.
 void release()
          Release a ServerContext.
 void releaseContext()
          Release the server context back to the server so it can be used by another client (if pooled), or so it can be destroyed (if non-pooled).
 void remove(String name)
          Remove an object from the server context's object dictionary.
 void removeAll()
          Remove all objects from the server context's object dictionary.
 String saveObject(Object obj)
          Save an object in the server context to a string.
 void setObject(String name, Object obj)
          Add an object running in the server context to the context's object dictionary.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerContext

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

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

Throws:
IOException - if there are interop problems ServerContext theServerContext = (ServerContext) 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

getJintegraDispatch

public com.esri.arcgis.interop.Dispatch getJintegraDispatch()
Deprecated. Internal use only.

Specified by:
getJintegraDispatch in interface com.esri.arcgis.interop.RemoteObjRef

release

public void release()
Release a ServerContext.

Specified by:
release in interface com.esri.arcgis.interop.RemoteObjRef

getServerObject

public IServerObject getServerObject()
                              throws IOException,
                                     AutomationException
The map or geocode server object running in the server context.

Specified by:
getServerObject in interface IServerContext
Returns:
A reference to a com.esri.arcgis.server.IServerObject
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createObject

public Object createObject(String cLSID)
                    throws IOException,
                           AutomationException
Create an object in the server context whose type is specified by the CLSID.

Specified by:
createObject in interface IServerContext
Parameters:
cLSID - The cLSID (in)
Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createObject

public Object createObject(Class classDef)
                    throws IOException,
                           AutomationException
Create an instance of an ArcGIS Java extension in the server context whose class definition is specified by classDef.

Specified by:
createObject in interface IServerContext
Parameters:
classDef - The class definition of an ArcGIS Java extension (in)
Returns:
A reference to a remote instance of an ArcGIS Java extension
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

loadObject

public Object loadObject(String str)
                  throws IOException,
                         AutomationException
Create an object in the server context from a string that was created by saving an object using SaveObject.

Specified by:
loadObject in interface IServerContext
Parameters:
str - The str (in)
Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

saveObject

public String saveObject(Object obj)
                  throws IOException,
                         AutomationException
Save an object in the server context to a string.

Specified by:
saveObject in interface IServerContext
Parameters:
obj - A reference to another Object (IUnknown) (in)
Returns:
The str
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getObject

public Object getObject(String name)
                 throws IOException,
                        AutomationException
Get a reference to an object in the server context's object dictionary by its Name.

Specified by:
getObject in interface IServerContext
Parameters:
name - The name (in)
Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setObject

public void setObject(String name,
                      Object obj)
               throws IOException,
                      AutomationException
Add an object running in the server context to the context's object dictionary.

Specified by:
setObject in interface IServerContext
Parameters:
name - The name (in)
obj - A reference to another Object (IUnknown) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

remove

public void remove(String name)
            throws IOException,
                   AutomationException
Remove an object from the server context's object dictionary.

Specified by:
remove in interface IServerContext
Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeAll

public void removeAll()
               throws IOException,
                      AutomationException
Remove all objects from the server context's object dictionary.

Specified by:
removeAll in interface IServerContext
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

releaseContext

public void releaseContext()
                    throws IOException,
                           AutomationException
Release the server context back to the server so it can be used by another client (if pooled), or so it can be destroyed (if non-pooled).

Specified by:
releaseContext in interface IServerContext
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.