public class IRESTRequestHandlerProxy extends com.esri.arcgis.interop.Dispatch implements IRESTRequestHandler, java.io.Serializable
Description: 'Provides access to REST request for SO or SOE.' 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 =
Modifier and Type | Field and Description |
---|---|
boolean |
noncastable |
static java.lang.Class |
targetClass |
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
IID, IID9d66a418_d54a_48ed_88bd_043a25fa9c83
Modifier | Constructor and Description |
---|---|
|
IRESTRequestHandlerProxy()
For internal use only
|
|
IRESTRequestHandlerProxy(java.lang.Object obj) |
protected |
IRESTRequestHandlerProxy(java.lang.Object obj,
java.lang.String iid) |
|
IRESTRequestHandlerProxy(java.lang.String CLSID,
java.lang.String host,
com.esri.arcgis.interop.AuthInfo authInfo) |
protected |
IRESTRequestHandlerProxy(java.lang.String CLSID,
java.lang.String iid,
java.lang.String host,
com.esri.arcgis.interop.AuthInfo authInfo) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(java.lang.String iidStr,
java.lang.Object theListener,
java.lang.Object theSource)
Adds a Java object to be a listener for a specific kind of event generated by the COM object.
|
java.lang.String |
getSchema()
This method returns the resource hierarchy of a REST based SOE.
|
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.
|
void |
removeListener(java.lang.String iidStr,
java.lang.Object theListener)
Removes a Java object as a listener to events generated by a COM object.
|
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
public static final java.lang.Class targetClass
public boolean noncastable
public IRESTRequestHandlerProxy(java.lang.String CLSID, java.lang.String host, com.esri.arcgis.interop.AuthInfo authInfo) throws java.net.UnknownHostException, java.io.IOException
java.net.UnknownHostException
java.io.IOException
public IRESTRequestHandlerProxy()
public IRESTRequestHandlerProxy(java.lang.Object obj) throws java.io.IOException
java.io.IOException
protected IRESTRequestHandlerProxy(java.lang.Object obj, java.lang.String iid) throws java.io.IOException
java.io.IOException
protected IRESTRequestHandlerProxy(java.lang.String CLSID, java.lang.String iid, java.lang.String host, com.esri.arcgis.interop.AuthInfo authInfo) throws java.io.IOException
java.io.IOException
public void addListener(java.lang.String iidStr, java.lang.Object theListener, java.lang.Object theSource) throws java.io.IOException
com.esri.arcgis.interop.Dispatch
addListener
in class com.esri.arcgis.interop.Dispatch
iidStr
- the ID of the outgoing interface, implemented by the listenertheListener
- the object to be informed of the eventstheSource
- the proxy class that represents the COM class that is the source of the eventsjava.io.IOException
public void removeListener(java.lang.String iidStr, java.lang.Object theListener) throws java.io.IOException
com.esri.arcgis.interop.Dispatch
removeListener
in class com.esri.arcgis.interop.Dispatch
iidStr
- the ID of the outgoing interface, implemented by the listenertheListener
- the object that no longer wishes to be informed of the eventsjava.io.IOException
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
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
handleRESTRequest
in interface IRESTRequestHandler
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)java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.public java.lang.String getSchema() throws java.io.IOException, AutomationException
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"]
}
]
}
]
}
getSchema
in interface IRESTRequestHandler
java.io.IOException
- If there are interop problems.AutomationException
- If the ArcObject component throws an exception.