com.esri.arcgis.networkanalyst
Class NAServer

java.lang.Object
  extended by com.esri.arcgis.networkanalyst.NAServer
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, INAServer, INAServer2, IServerObjectExtension, ILogSupport, IObjectActivate, IObjectConstruct, IRequestHandler, IRequestHandler2, IRESTRequestHandler, ISupportErrorInfo, java.io.Serializable

public class NAServer
extends java.lang.Object
implements com.esri.arcgis.interop.RemoteObjRef, INAServer, INAServer2, IServerObjectExtension, ILogSupport, IObjectActivate, IObjectConstruct, IRequestHandler, IRequestHandler2, IRESTRequestHandler, ISupportErrorInfo

COM Class 'NAServer'. Generated 3/19/2015 1:20:45 PM from 'C:\ArcGIS\COM\esriNetworkAnalyst.olb'

Description 'Deprecated as of 10.0. A MapServer object extension for performing network analysis within a stateless environment.' 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.networkanalyst.INAServer2
IID, IID67020a7d_a382_404a_80d3_0454541444f3, xxDummy
 
Fields inherited from interface com.esri.arcgis.networkanalyst.INAServer
IID7d270900_1f97_4c6f_8505_d6afcf807bb6
 
Fields inherited from interface com.esri.arcgis.system.IObjectActivate
IID, IIDe3b78022_143e_4e61_9099_ed319ec061e7, xxDummy
 
Fields inherited from interface com.esri.arcgis.system.IRequestHandler2
IID, IID8319e7d0_8ad1_48ed_aa99_03f9d0c93ba8, xxDummy
 
Fields inherited from interface com.esri.arcgis.system.IRequestHandler
IID46a0e2ea_3b64_4a46_bd78_88a1660f35bb
 
Fields inherited from interface com.esri.arcgis.system.IRESTRequestHandler
IID, IID9d66a418_d54a_48ed_88bd_043a25fa9c83, xxDummy
 
Fields inherited from interface com.esri.arcgis.system.ISupportErrorInfo
IID, IIDdf0b3d60_548f_101b_8e65_08002b2bd119, xxDummy
 
Constructor Summary
NAServer()
          Constructs a NAServer using ArcGIS Engine.
NAServer(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
NAServer theNAServer = (NAServer) obj;
 
Method Summary
 void activate()
          Activates the object.
 void construct(IPropertySet props)
          Two phase object construction.
 void deactivate()
          Deactivates the object.
 boolean equals(java.lang.Object o)
          Compare this object with another
static java.lang.String getClsid()
          getClsid.
 com.esri.arcgis.interop.Dispatch getJintegraDispatch()
          Deprecated. Internal use only.
 java.lang.String[] getNALayerNames(int layerType)
          Array of network analysis layers of a particular analysis type.
 INAServerNetworkDescription getNetworkDescription(java.lang.String nALayerName)
          Description of the network dataset associated with the specified network analysis layer.
 java.lang.String getSchema()
          This method returns the resource hierarchy of a REST based SOE.
 INAServerSolverParams getSolverParameters(java.lang.String nALayerName)
          Default solver parameters for the specified network analysis layer.
 INAServerSolverParams getSolverParameters2(java.lang.String nALayerName, java.lang.String layerToken, boolean populateNAClasses)
          Default solver parameters for the specified network analysis layer.
 byte[] handleBinaryRequest(byte[] request)
          Handles a binary request.
 byte[] handleBinaryRequest2(java.lang.String capabilities, byte[] request)
          Handles a binary request with explicit capabilities.
 byte[] handleRESTRequest(java.lang.String capabilities, java.lang.String resourceName, java.lang.String operationName, java.lang.String operationInput, java.lang.String outputFormat, java.lang.String requestProperties, java.lang.String[] responseProperties)
          Handles REST requests for SOE.
 java.lang.String handleStringRequest(java.lang.String capabilities, java.lang.String request)
          Handles a SOAP string request.
 int hashCode()
          the hashcode for this object
 void init(IServerObjectHelper pSOH)
          Initializes and starts the server object specified by the IServerObjectHelper reference.
 void initLogging(ILog log)
          Initializes an object with a log.
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 void release()
          Release a NAServer.
 void shutdown()
          Stops the server object specified by the IServerObjectHelper reference.
 INAServerSolverResults solve(INAServerSolverParams nAServerSolverParams)
          Perform network analysis based on the input solve parameters.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NAServer

public NAServer()
         throws java.io.IOException,
                java.net.UnknownHostException
Constructs a NAServer using ArcGIS Engine.

Throws:
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems

NAServer

public NAServer(java.lang.Object obj)
         throws java.io.IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
NAServer theNAServer = (NAServer) obj;

Construct a NAServer using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to NAServer.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
java.io.IOException - if there are interop problems
Method Detail

getClsid

public static java.lang.String getClsid()
getClsid.


equals

public boolean equals(java.lang.Object o)
Compare this object with another

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class java.lang.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 NAServer.

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

getNALayerNames

public java.lang.String[] getNALayerNames(int layerType)
                                   throws java.io.IOException,
                                          AutomationException
Array of network analysis layers of a particular analysis type.

Specified by:
getNALayerNames in interface INAServer
Parameters:
layerType - A com.esri.arcgis.networkanalyst.esriNAServerLayerType constant (in)
Returns:
The nALayerNames
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNetworkDescription

public INAServerNetworkDescription getNetworkDescription(java.lang.String nALayerName)
                                                  throws java.io.IOException,
                                                         AutomationException
Description of the network dataset associated with the specified network analysis layer.

Specified by:
getNetworkDescription in interface INAServer
Parameters:
nALayerName - The nALayerName (in)
Returns:
A reference to a com.esri.arcgis.networkanalyst.INAServerNetworkDescription
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSolverParameters

public INAServerSolverParams getSolverParameters(java.lang.String nALayerName)
                                          throws java.io.IOException,
                                                 AutomationException
Default solver parameters for the specified network analysis layer.

Specified by:
getSolverParameters in interface INAServer
Parameters:
nALayerName - The nALayerName (in)
Returns:
A reference to a com.esri.arcgis.networkanalyst.INAServerSolverParams
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

solve

public INAServerSolverResults solve(INAServerSolverParams nAServerSolverParams)
                             throws java.io.IOException,
                                    AutomationException
Perform network analysis based on the input solve parameters.

Specified by:
solve in interface INAServer
Parameters:
nAServerSolverParams - A reference to a com.esri.arcgis.networkanalyst.INAServerSolverParams (in)
Returns:
A reference to a com.esri.arcgis.networkanalyst.INAServerSolverResults
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSolverParameters2

public INAServerSolverParams getSolverParameters2(java.lang.String nALayerName,
                                                  java.lang.String layerToken,
                                                  boolean populateNAClasses)
                                           throws java.io.IOException,
                                                  AutomationException
Default solver parameters for the specified network analysis layer.

Specified by:
getSolverParameters2 in interface INAServer2
Parameters:
nALayerName - The nALayerName (in)
layerToken - The layerToken (in)
populateNAClasses - The populateNAClasses (in)
Returns:
A reference to a com.esri.arcgis.networkanalyst.INAServerSolverParams
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

init

public void init(IServerObjectHelper pSOH)
          throws java.io.IOException,
                 AutomationException
Initializes and starts the server object specified by the IServerObjectHelper reference.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
init in interface IServerObjectExtension
Parameters:
pSOH - A reference to a com.esri.arcgis.server.IServerObjectHelper (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

shutdown

public void shutdown()
              throws java.io.IOException,
                     AutomationException
Stops the server object specified by the IServerObjectHelper reference.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
shutdown in interface IServerObjectExtension
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

initLogging

public void initLogging(ILog log)
                 throws java.io.IOException,
                        AutomationException
Initializes an object with a log.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
initLogging in interface ILogSupport
Parameters:
log - A reference to a com.esri.arcgis.system.ILog (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

activate

public void activate()
              throws java.io.IOException,
                     AutomationException
Activates the object.

Specified by:
activate in interface IObjectActivate
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deactivate

public void deactivate()
                throws java.io.IOException,
                       AutomationException
Deactivates the object.

Specified by:
deactivate in interface IObjectActivate
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

construct

public void construct(IPropertySet props)
               throws java.io.IOException,
                      AutomationException
Two phase object construction.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
construct in interface IObjectConstruct
Parameters:
props - A reference to a com.esri.arcgis.system.IPropertySet (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

handleBinaryRequest

public byte[] handleBinaryRequest(byte[] request)
                           throws java.io.IOException,
                                  AutomationException
Handles a binary request.

Specified by:
handleBinaryRequest in interface IRequestHandler
Parameters:
request - An unsigned byte (in)
Returns:
An unsigned byte
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

handleStringRequest

public java.lang.String handleStringRequest(java.lang.String capabilities,
                                            java.lang.String request)
                                     throws java.io.IOException,
                                            AutomationException
Handles a SOAP string request.

Specified by:
handleStringRequest in interface IRequestHandler
Parameters:
capabilities - The capabilities (in)
request - The request (in)
Returns:
The response
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

handleBinaryRequest2

public byte[] handleBinaryRequest2(java.lang.String capabilities,
                                   byte[] request)
                            throws java.io.IOException,
                                   AutomationException
Handles a binary request with explicit capabilities.

Specified by:
handleBinaryRequest2 in interface IRequestHandler2
Parameters:
capabilities - The capabilities (in)
request - An unsigned byte (in)
Returns:
An unsigned byte
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

handleRESTRequest

public byte[] handleRESTRequest(java.lang.String capabilities,
                                java.lang.String resourceName,
                                java.lang.String operationName,
                                java.lang.String operationInput,
                                java.lang.String outputFormat,
                                java.lang.String requestProperties,
                                java.lang.String[] responseProperties)
                         throws java.io.IOException,
                                AutomationException
Handles REST requests for SOE.

This method is invoked by ArcGIS Server's REST handler, which intercepts client's request (in URL form), parses it and passes it on to this method in form of parameter values.

The REST SOE developer must add logic to use these parameter values to determine which resource/operation is being requested and accordingly handle these requests and generate responses in the output format indicated by the "outputFormat" parameter. For more information on developing REST SOEs, please consult the Java ArcObjects Developer Guide.

Developer doc: Developing extensions > Server Object Extensions > SOE Web Services > REST Web Services > Developing SOE REST Web Services
Samples: Samples > Server Object Extensions section

Specified by:
handleRESTRequest in interface IRESTRequestHandler
Parameters:
capabilities - The capabilities supported by the SOE. An admin can choose which capabilities are enabled on a particular SOE (in ArcGIS Manager or ArcCatalog), based on certain criteria such as security roles. This list of allowed capabilities is then sent to this method, at runtime, as a comma separated list. (in)
resourceName - Name of the resource being addressed. If empty, its assumed that root resource is being addressed. (in)
operationName - Name of the operation being invoked. If empty, description of resource is returned. (in)
operationInput - Input parameters, in form of comma separated list, to the operation specified by operationName parameter. (in)
outputFormat - OutputFormat of operation. Possible formats are JSON, HTML, AMF, etc. (in)
requestProperties - The requestProperties (in)
responseProperties - The responseProperties (out)
Returns:
Output generated by the SOE
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSchema

public java.lang.String getSchema()
                           throws java.io.IOException,
                                  AutomationException
This method returns the resource hierarchy of a REST based SOE. This hierarchy is in JSON format as shown in the example below:

For an SOE that has a root resource (called "root") with one operation ("operation0"), and 2 sub-resources with one operation each ("operation1" and "operation2" respectively), the schema would look like:


 {
   "name": "MyRESTSOE",
   "description": "My REST SOE with 3 resources and 1 operation each.",
   "isCollection": false,
   "operations": [
   {
      "name": "operation0",
      "parameters": ["param01"],
      "supportedOutputFormats": ["json"]
    }
 ],
 "resources": [
  {
      "name": "subresource1",
      "description": "Sub Resource 1",
      "isCollection": true,
      "operations": [
       {
          "name": "operation1",
          "parameters": ["param10", "param11"],
          "supportedOutputFormats": ["json"]
       }
    ]
  },
  {
      "name": "subresource2",
      "description": "Sub Resource 2",
      "isCollection": true,
      "operations": [
       {
          "name": "operation2",
          "parameters": ["param20", "param21"],
          "supportedOutputFormats": ["json"]
       }
    ]
  }
 ]
}

Specified by:
getSchema in interface IRESTRequestHandler
Returns:
resource hierarchy of REST SOE, as String
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws java.io.IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.