org.gcube.data.tml.clients
Interface TBinderClient

All Known Implementing Classes:
BinderClient

public interface TBinderClient

High-level interface to T-Binder services.

T-Binder services host plugins that can bind given data sources to T-Reader and T-Writer services, i.e. services that give access to the bound sources under a tree-based model. T-Binder clients pass BindingParameters to target service plugins.

Clients may target T-Binder services at known endpoints (direct mode). Alternatively, they may discover T-Binder services that host given plugins (discovery mode). In discovery mode, clients attempt to interact with all the services until they succeed with one. They then cache the endpoint of this service and use it first for subsequent interactions.

Author:
Fabio Simeoni
See Also:
TReaderClient, TWriterClient

Method Summary
 List<org.gcube.data.tm.stubs.SourceBinding> bind(BindingParameters parameters)
          Binds one ore more data sources to T-Reader and/or T-Writer services.
 void bindAsync(BindingParameters parameters, BinderConsumer consumer)
          Binds asynchronously to T-Reader and/or T-Writer services.
 

Method Detail

bind

List<org.gcube.data.tm.stubs.SourceBinding> bind(BindingParameters parameters)
                                                 throws IllegalArgumentException,
                                                        org.apache.commons.discovery.DiscoveryException,
                                                        InvalidRequestException,
                                                        Exception
Binds one ore more data sources to T-Reader and/or T-Writer services.

Parameters:
parameters - the binding parameters
Returns:
the bindings
Throws:
IllegalArgumentException - if the parameters are null
org.apache.commons.discovery.DiscoveryException - if, in discovery mode, there is no service with the target plugin
InvalidRequestException - if the parameters are invalid for the service
Exception - if the operation fails for any other error

bindAsync

void bindAsync(BindingParameters parameters,
               BinderConsumer consumer)
               throws IllegalArgumentException,
                      org.apache.commons.discovery.DiscoveryException,
                      Exception
Binds asynchronously to T-Reader and/or T-Writer services.

Parameters:
parameters - the binding parameters
consumer - a consumer for the asynchronous delivery of responses
Throws:
IllegalArgumentException - if the parameters or the consumer are null
org.apache.commons.discovery.DiscoveryException - if, in discovery mode, there is no service with the target plugin
Exception - if the operation fails for any other error


Copyright © 2012. All Rights Reserved.