chemaxon.marvin.services
Class ServiceHandler<DT extends chemaxon.marvin.services.ServiceDescriptor>

java.lang.Object
  extended by chemaxon.marvin.services.ServiceHandler<DT>
Type Parameters:
DT - the descriptor type

public abstract class ServiceHandler<DT extends chemaxon.marvin.services.ServiceDescriptor>
extends java.lang.Object

Manages service calls.

Since:
5.6
Author:
Istvan Rabel

Constructor Summary
ServiceHandler()
           
 
Method Summary
<T> void
callService(DT descriptor, AsyncCallback<T> handler, java.lang.Object... arguments)
          Performs an asynchronous service call.
abstract  java.lang.Object callService(DT descriptor, java.lang.Object... arguments)
          Performs a synchronized service call.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceHandler

public ServiceHandler()
Method Detail

callService

public <T> void callService(DT descriptor,
                            AsyncCallback<T> handler,
                            java.lang.Object... arguments)
Performs an asynchronous service call.

Type Parameters:
T - the return type
Parameters:
descriptor - the service descriptor
handler - the response handler
arguments - the service call arguments

callService

public abstract java.lang.Object callService(DT descriptor,
                                             java.lang.Object... arguments)
                                      throws ServiceException
Performs a synchronized service call.

Parameters:
descriptor - the service descriptor
arguments - the service call arguments
Returns:
result of service call
Throws:
ServiceException - on failure