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 Object

Manages service calls.

Since:
5.6
Author:
Istvan Rabel

Constructor Summary
ServiceHandler()
           
 
Method Summary
<T> void
callService(DT descriptor, AsyncCallback<T> handler, Object... arguments)
          Performs an asynchronous service call.
abstract
<T> T
callService(DT descriptor, 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,
                            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 <T> T callService(DT descriptor,
                                  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