|
|||||||||
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.image.AGSImageResource
com.esri.adf.web.ags.data.image.AGSLocalImageResource
public class AGSLocalImageResource
The AGSLocalImageResource
represents a GISResource
for ArcGIS Server local
image services. Users need to provide the server object name, the host as well as the user to connect to the local
server.
It is important to note that for some AGS functionalities to share code between the internet and local resources, we
use SOAP to communicate with the server wherever possible. Given this scenario, this class is implemented as a
sub-class of the internet image resource represented by the AGSImageResource
class.
Users can access the full wealth of the server-side ArcObjects with this resource. However, it uses the capabilities
exposed by the ImageServerPort
interface wherever possible in order to facilitate
code-sharing among certain AGS functionalities.
Field Summary | |
---|---|
protected AGSLocalConnection |
delegate
A delegate which handles certain calls to the ArcGIS Server. |
Fields inherited from class com.esri.adf.web.ags.data.image.AGSImageResource |
---|
imageServer |
Fields inherited from class com.esri.adf.web.data.GISResource |
---|
alias, context, defaultSpatialReference, functionalities, hasFailedFunctionalities, init |
Constructor Summary | |
---|---|
AGSLocalImageResource()
Creates a new AGSLocalImageResource with no input parameters set. |
|
AGSLocalImageResource(String serverObjectName,
List<String> hosts,
String clusterType,
AGSUser user)
Creates a new AGSLocalImageResource with the given set of input parameters. |
Method Summary | |
---|---|
void |
activate()
This method is called by the associated WebContext when the context itself is being activated. |
Object |
createArcObject(String progId)
Creates an ArcObject with this progId in the current server context. |
protected void |
createImageServer()
This method connects to the ArcGIS server image service end point and creates a remote stub to the server. |
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 resource. |
String |
getAlias()
Returns a reader friendly name for this resource. |
String |
getClusterType()
Returns the cluster configuration for this resource. |
int |
getFailRecheckValue()
Return the fail recheck value. |
List<String> |
getHosts()
Returns the List of server hosts that this resource connects to |
com.esri.arcgisws.ImageServerPort |
getImageServer()
Returns The remote stub to the image service that this resource represents |
com.esri.arcgis.carto.ImageServer |
getLocalimageServer()
Returns The remote proxy to the local image server that this resource represents |
com.esri.arcgis.server.ServerConnection |
getServerConnection()
Returns the ServerConnection object used to connect the server. |
com.esri.arcgis.server.IServerContext |
getServerContext()
Returns the IServerContext to the server. |
com.esri.arcgis.server.IServerObjectManager |
getServerObjectManager()
Returns the IServerObjectManager to the connected server. |
String |
getServerObjectName()
Returns the name of the image server object that this resource represents |
AGSUser |
getUser()
Returns the AGSUser to impersonate connections to the server |
void |
init(WebContext webContext)
This method is called by the WebContext to initialize the resource. |
boolean |
isPooled()
Returns true if the server object is pooled. |
Object |
loadObject(String xml)
Deserializes the serialized state of a server-side object to a live server-side object. |
void |
passivate()
This method is called by the associated WebContext when the context itself is being passivated. |
String |
saveObject(Object persistObj)
Serializes a server-side ArObject to a String. |
void |
setClusterType(String clusterType)
Sets the cluster configuration for this resource. |
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)
Sets the List of server hosts that this resource connects to |
void |
setServerObjectName(String serverObjectName)
Sets the name of the image server object that this resource represents |
void |
setUser(AGSUser user)
Sets the AGSUser to impersonate connections to the server |
Methods inherited from class com.esri.adf.web.ags.data.image.AGSImageResource |
---|
getEndPointURL, getImageFormat, getImageServiceInfo, getServiceCatalogURL, setDefaultSpatialReference, setEndPointURL, setImageServiceInfo, 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 AGSLocalConnection delegate
Constructor Detail |
---|
public AGSLocalImageResource()
Creates a new AGSLocalImageResource
with no input parameters set. This constructor is typically used when
one configures this resource in a JSF config file. If you are to programmatically create this resource, it is
recommended that you use the other constructor that takes various input parameters.
public AGSLocalImageResource(String serverObjectName, List<String> hosts, String clusterType, AGSUser user)
Creates a new AGSLocalImageResource
with the given set of input parameters. If you are to programmatically
create this resource, it is recommended that you use this constructor.
serverObjectName
- the name of the image server object that this resource representshosts
- the List
of server hosts that this resource connects toclusterType
- if multiple hosts are provided, cluster types of AGSLocalConnection.FAIL_OVER
or
AGSLocalConnection.ROUND_ROBIN
can be provided. A value of null
or
AGSLocalConnection.NONE_CLUSTER_TYPE
can be used in order to not use clusteringuser
- the AGSUser
to impersonate connections to the serverMethod Detail |
---|
protected void createImageServer()
AGSImageResource
This method connects to the ArcGIS server image service end point and creates a remote stub to the server. If a user is provided, it will attempt to connect to the server with that user's credentials.
createImageServer
in class AGSImageResource
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 AGSImageResource
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 GISResource
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 GISResource
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 GISResource
WebLifecycle.passivate()
,
WebContext.passivate()
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 AGSImageResource
public com.esri.arcgisws.ImageServerPort getImageServer()
AGSImageResource
Returns The remote stub to the image service that this resource represents
getImageServer
in class AGSImageResource
public com.esri.arcgis.carto.ImageServer getLocalimageServer()
Returns The remote proxy to the local image server that this resource represents
public Object createArcObject(String progId)
Creates an ArcObject with this progId in the current server context. Server side ArcObjects must be created in the current server context. This method does so and returns a remote proxy to the thus created server-side ArcObject
progId
- the class id of the server-side ArcObject to be created
Object
- a remote proxy to the created server-side ArcObject represented by this progIdpublic String saveObject(Object persistObj)
Serializes a server-side ArObject to a String. When connected to pooled services, the ADF creates a new server
context at the start of a request cycle and releases the server context at the end of the request cycle. Once the
server context is released, it is illegal to maintain a reference to any server-side object. However, if you need
to maintain the state of the server-side object, you can use this method to save the state of the object to a
String
representation. You can load the object again during the subsequent request cycles by using the
loadObject(String)
method.
persistObj
- the server-side ArcObject whose state is to be saved
String
- a String
s representation of the server-side objectpublic Object loadObject(String xml)
Deserializes the serialized state of a server-side object to a live server-side object. When connected to pooled
services, the ADF creates a new server context at the start of a request cycle and releases the server context at
the end of the request cycle. Once the server context is released, it is illegal to maintain a reference to any
server-side object. However, if you need to maintain the state of the server-side object, you can use the
saveObject(Object)
method to save the state of the object to a String
representation. You can
load the object again during the subsequent request cycles by using this loadObject(String)
method.
xml
- the String
representation of the server-side object
Object
- the loaded server-side ArcObjectpublic boolean equals(String resource)
Determines whether the resource string represents this resource.
resource
- the resource string
public boolean isPooled()
Returns true if the server object is pooled.
public com.esri.arcgis.server.IServerObjectManager getServerObjectManager()
Returns the IServerObjectManager
to the connected server.
IServerObjectManager
to the connected serverpublic com.esri.arcgis.server.ServerConnection getServerConnection()
Returns the ServerConnection
object used to connect the server.
ServerConnection
object used to connect the serverpublic com.esri.arcgis.server.IServerContext getServerContext()
Returns the IServerContext
to the server. When connected to pooled services, the ADF creates a new
server context at the start of a request cycle and releases the server context at the end of the request cycle.
IServerContext
to the serverpublic String getServerObjectName()
Returns the name of the image server object that this resource represents
public void setServerObjectName(String serverObjectName)
Sets the name of the image server object that this resource represents
serverObjectName
- the name of the image server object that this resource representspublic List<String> getHosts()
Returns the List
of server hosts that this resource connects to
List
of server hosts that this resource connects topublic void setHosts(List<String> hosts)
Sets the List
of server hosts that this resource connects to
hosts
- the List
of server hosts that this resource connects topublic void setUser(AGSUser user)
Sets the AGSUser
to impersonate connections to the server
setUser
in class AGSImageResource
user
- the AGSUser
to impersonate connections to the serverpublic AGSUser getUser()
Returns the AGSUser
to impersonate connections to the server
getUser
in class AGSImageResource
AGSUser
to impersonate connections to the serverpublic String getClusterType()
Returns the cluster configuration for this resource. If multiple hosts are provided, cluster types of
AGSLocalConnection.FAIL_OVER
or AGSLocalConnection.ROUND_ROBIN
can be provided. A value of
null
or AGSLocalConnection.NONE_CLUSTER_TYPE
can be used in order to not use clustering.
AGSLocalConnection.FAIL_OVER
or AGSLocalConnection.ROUND_ROBIN
can be provided. A value of
null
or AGSLocalConnection.NONE_CLUSTER_TYPE
can be used in order to not use
clusteringpublic void setClusterType(String clusterType)
Sets the cluster configuration for this resource. If multiple hosts are provided, cluster types of
AGSLocalConnection.FAIL_OVER
or AGSLocalConnection.ROUND_ROBIN
can be provided. A value of
null
or AGSLocalConnection.NONE_CLUSTER_TYPE
can be used in order to not use clustering.
clusterType
- the cluster configuration for this resource. if multiple hosts are provided, cluster types of
AGSLocalConnection.FAIL_OVER
or AGSLocalConnection.ROUND_ROBIN
can be provided. A value of
null
or AGSLocalConnection.NONE_CLUSTER_TYPE
can be used in order to not use
clusteringpublic 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 |