|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.adf.web.data.GISResource
com.esri.adf.web.ags.data.gp.AGSGPResource
com.esri.adf.web.ags.data.gp.AGSLocalGPResource
public class AGSLocalGPResource
Field Summary | |
---|---|
protected AGSLocalConnection |
delegate
|
protected com.esri.arcgis.geoprocessing.GPServer |
localGPServer
|
Fields inherited from class com.esri.adf.web.ags.data.gp.AGSGPResource |
---|
endPointURL, generatedAlias, gpServer, resultMapDescription, resultMapResource, resultMapServerInfo, serviceCatalogURL, user |
Fields inherited from class com.esri.adf.web.data.GISResource |
---|
alias, context, defaultSpatialReference, functionalities, hasFailedFunctionalities, init |
Constructor Summary | |
---|---|
AGSLocalGPResource()
|
|
AGSLocalGPResource(String serverObjectName,
List<String> hosts,
String clusterType,
AGSUser user)
|
Method Summary | |
---|---|
void |
activate()
This method is called by the associated WebContext when the context itself is being activated. |
void |
addHost(String host)
|
Object |
createArcObject(String progId)
Creates an ArcObject with this progId in the current server context. |
protected void |
createGPServer()
|
protected void |
createResultMapResource()
|
void |
destroy()
The cleanup (final) chores of the resource like releasing held resources must be performed in this method. |
boolean |
equals(String resource)
Determines whether the resource string represents this AGSLocalResource. |
String |
getAlias()
Returns a reader friendly name for this resource. |
String |
getClusterType()
|
int |
getFailRecheckValue()
Return the fail recheck value. |
com.esri.arcgisws.GPServerPort |
getGPServer()
|
List<String> |
getHosts()
|
com.esri.arcgis.geoprocessing.GPServer |
getLocalGPServer()
|
com.esri.arcgis.server.ServerConnection |
getServerConnection()
Returns the ServerConnection object from the server. |
com.esri.arcgis.server.IServerContext |
getServerContext()
Returns the IServerContext object from the server. |
com.esri.arcgis.server.IServerObjectManager |
getServerObjectManager()
Returns the IServerObjectManager object from the server. |
String |
getServerObjectName()
The name of the server object on the GIS server machine. |
AGSUser |
getUser()
|
void |
init(WebContext webContext)
This method is called by the WebContext to initialize the resource. |
boolean |
isPooled()
Returns an indicator of whether the server object is pooled or not. |
Object |
loadObject(String xml)
Deserializes the string to a server object by calling the loadObject method on the ServerContext . |
void |
passivate()
This method is called by the associated WebContext when the context itself is being passivated. |
String |
saveObject(Object persistObj)
Serializes a server object to a String. |
void |
setClusterType(String clusterType)
|
void |
setFailRecheckValue(int value)
Sets the fail recheck value, used for checking if the server is alive after n bypass rounds. |
void |
setHosts(List<String> hosts)
|
void |
setServerObjectName(String serverObjectName)
|
void |
setUser(AGSUser user)
|
Methods inherited from class com.esri.adf.web.ags.data.gp.AGSGPResource |
---|
getEndPointURL, getResultMapResource, getServiceCatalogURL, setEndPointURL, setResultMapResource, setServiceCatalogURL |
Methods inherited from class com.esri.adf.web.data.GISResource |
---|
addFunctionality, getDefaultSpatialReference, getFunctionalities, getFunctionality, getWebContext, setAlias, setFunctionalities |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient com.esri.arcgis.geoprocessing.GPServer localGPServer
protected AGSLocalConnection delegate
Constructor Detail |
---|
public AGSLocalGPResource()
public AGSLocalGPResource(String serverObjectName, List<String> hosts, String clusterType, AGSUser user)
Method Detail |
---|
protected void createGPServer()
createGPServer
in class AGSGPResource
protected void createResultMapResource()
createResultMapResource
in class AGSGPResource
public void init(WebContext webContext)
GISResource
This method is called by the WebContext
to initialize the resource. This is typically called when the
context itself is initialized or when users add a new resource to the context by using the
WebContext.addResource(String, GISResource)
method. A GISResource
is usable
only after this method has been called.
This method iterates through all its supported GISFunctionality
s and calls the
GISFunctionality.initFunctionality(GISResource)
on them all.
Sub-classes that want to do custom initialization should override this method and make the super
call
first before doing the custom stuff:
public void init(WebContext context) { super.init(context); myInit(); }
init
in interface WebContextInitialize
init
in class AGSGPResource
webContext
- the WebContext
that maintains a reference to this resourceWebContextInitialize.init(com.esri.adf.web.data.WebContext)
,
GISFunctionality.initFunctionality(GISResource)
,
WebContext.init(WebContext)
,
WebContext.addResource(String, GISResource)
public void destroy()
GISResource
The cleanup (final) chores of the resource like releasing held resources must be performed in this method. This is
typically called when the context itself is being destroyed or when users remove this resource from the context by
using the WebContext.removeResource(GISResource)
method. A GISResource
is unusable after this
method has been called.
This method iterates through all its supported GISFunctionality
s and calls the
GISFunctionality.destroyFunctionality()
on them all.
Sub-classes that want to do custom cleanup chores should override this method and do the custom cleanup first
before making the super
call:
public void destroy() { myDestroy(); super.destroy(); }
destroy
in interface WebContextInitialize
destroy
in class AGSGPResource
WebContextInitialize.destroy()
,
GISFunctionality.destroyFunctionality()
,
WebContext.destroy()
,
WebContext.removeResource(GISResource)
public void activate()
GISResource
This method is called by the associated WebContext
when the context itself is being activated. This
typically happens when a new user request is received to perform a set of operations. A GISResource
is
available for the execution of these operations only after this method has been called.
This method iterates through all its supported GISFunctionality
s and calls the activate()
method on those functionalities that implement WebLifecycle
.
Sub-classes that want to do custom activation should override this method and make the super
call
first before doing the custom stuff:
public void activate() { super.activate(); myActivate(); }
activate
in interface WebLifecycle
activate
in class AGSGPResource
WebLifecycle.activate()
,
WebContext.activate()
public void passivate()
GISResource
This method is called by the associated WebContext
when the context itself is being passivated. This
typically happens after a user request to perform a set of operations has been serviced. A GISResource
is
unavailable for the execution of more operations after this method has been called.
This method iterates through all its supported GISFunctionality
s and calls the passivate()
method on those functionalities that implement WebLifecycle
.
Sub-classes that want to do custom passivation should override this method and do the custom passivation first
before making the super
call:
public void passivate() { myPassivate(); super.passivate(); }
passivate
in interface WebLifecycle
passivate
in class AGSGPResource
WebLifecycle.passivate()
,
WebContext.passivate()
public Object createArcObject(String progId)
progId
- the class id
Object
- the ArcObject represented by this progIdpublic String saveObject(Object persistObj)
persistObj
- the object to store
String
- a string representation of the objectpublic Object loadObject(String xml)
ServerContext
.
xml
- the string representation of the server object
Object
- the loaded Objectpublic boolean equals(String resource)
resource
- the resource string
public com.esri.arcgis.geoprocessing.GPServer getLocalGPServer()
public com.esri.arcgisws.GPServerPort getGPServer()
getGPServer
in class AGSGPResource
public boolean isPooled()
public String getAlias()
GISResource
Returns a reader friendly name for this resource.
It is a good practice for users to explicitly set an alias when the resource is created programmatically or declaratively. Resource providers should provide an auto-generated alias anyway in case users don't explicitly set an alias themselves.
getAlias
in class GISResource
public com.esri.arcgis.server.IServerObjectManager getServerObjectManager()
IServerObjectManager
object from the server.
IServerObjectManager
- the IServerObjectMananger objectpublic com.esri.arcgis.server.ServerConnection getServerConnection()
ServerConnection
object from the server.
ServerConnection
- the ServerConnection objectpublic com.esri.arcgis.server.IServerContext getServerContext()
IServerContext
object from the server.
IServerContext
- the IServerContext objectpublic String getServerObjectName()
String
- the server object namepublic void setServerObjectName(String serverObjectName)
public List<String> getHosts()
public void setHosts(List<String> hosts)
public void addHost(String host)
public void setUser(AGSUser user)
setUser
in class AGSGPResource
public AGSUser getUser()
getUser
in class AGSGPResource
public String getClusterType()
public void setClusterType(String clusterType)
public int getFailRecheckValue()
public void setFailRecheckValue(int value)
value
- the fail recheck value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |