chemaxon.marvin.services.json
Class JsonServiceDescriptor

java.lang.Object
  extended by chemaxon.marvin.services.ServiceDescriptor
      extended by chemaxon.marvin.services.json.JsonServiceDescriptor

public class JsonServiceDescriptor
extends chemaxon.marvin.services.ServiceDescriptor

Service descriptor of JSON type requests.

Since:
5.6
Author:
Imre Barna

Nested Class Summary
static class JsonServiceDescriptor.Method
          request method
 
Field Summary
static String DESCRIPTOR_URI
          Property key for Service descriptor as String
 
Fields inherited from class chemaxon.marvin.services.ServiceDescriptor
ALIAS, ARGUMENTS, DESCRIPTION, METHOD, NAME, propertyChangeSupport, URL
 
Constructor Summary
JsonServiceDescriptor()
           
 
Method Summary
 String getDescriptorURI()
          Gets the URI of the JSON RPC descriptor file
static int getId(String operationName)
          Gets an ID for a method name, to make sure the client can identify the answer for the request.
 JsonServiceDescriptor.Method getRequestMethod()
          Gets the HTTP method of the request.
 chemaxon.marvin.services.json.JsonServiceHandler getServiceHandler()
          Returns a service handler instance for this descriptor.
 String getSimpleName()
          Returns the simple name of the service type
 void setDescriptorURI(String descriptorURI)
          Sets the URI of the JSON RPC descriptor file
 void setRequestMethod(JsonServiceDescriptor.Method requestMethod)
          Sets the HTTP method of the request.
 
Methods inherited from class chemaxon.marvin.services.ServiceDescriptor
addArgument, getAlias, getArgument, getArgumentCount, getArguments, getDescription, getIcon, getMethodName, getName, getProperty, getPropertyChangeSupport, getPropertyKeys, getURL, isAvailable, removeArgument, setAlias, setArgument, setDescription, setMethodName, setName, setProperty, setURL, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DESCRIPTOR_URI

public static final String DESCRIPTOR_URI
Property key for Service descriptor as String

See Also:
Constant Field Values
Constructor Detail

JsonServiceDescriptor

public JsonServiceDescriptor()
Method Detail

getServiceHandler

public chemaxon.marvin.services.json.JsonServiceHandler getServiceHandler()
Description copied from class: chemaxon.marvin.services.ServiceDescriptor
Returns a service handler instance for this descriptor. The returned handler is capable to perform service call on the service described by this descriptor

Specified by:
getServiceHandler in class chemaxon.marvin.services.ServiceDescriptor
Returns:
a service handler instance for this descriptor

getRequestMethod

public JsonServiceDescriptor.Method getRequestMethod()
Gets the HTTP method of the request.

Returns:
The HTTP method of the request

setRequestMethod

public void setRequestMethod(JsonServiceDescriptor.Method requestMethod)
Sets the HTTP method of the request.

Parameters:
requestMethod - The HTTP method of the request

getSimpleName

public String getSimpleName()
Description copied from class: chemaxon.marvin.services.ServiceDescriptor
Returns the simple name of the service type

Overrides:
getSimpleName in class chemaxon.marvin.services.ServiceDescriptor
Returns:
the simple name of the service type

getDescriptorURI

public String getDescriptorURI()
Gets the URI of the JSON RPC descriptor file

Returns:
URI of JSON RPC descriptor file

setDescriptorURI

public void setDescriptorURI(String descriptorURI)
Sets the URI of the JSON RPC descriptor file

Parameters:
descriptorURI - URI of JSON RPC descriptor file

getId

public static int getId(String operationName)
Gets an ID for a method name, to make sure the client can identify the answer for the request.

Parameters:
operationName - The name of the selected operation.
Returns:
An integer ID that is usable for the next method call of the given operation.