org.gcube.data.tml.clients
Class BinderClient

java.lang.Object
  extended by org.gcube.data.tml.clients.BinderClient
All Implemented Interfaces:
TBinderClient

public class BinderClient
extends Object
implements TBinderClient

A TBinderClient implementation.

Author:
Fabio Simeoni

Constructor Summary
BinderClient(org.gcube.common.clients.Client<org.gcube.data.tm.stubs.TBinderPortType> client)
          Creates an instance with a given Client.
BinderClient(org.gcube.common.clients.gcore.StatefulQuery query)
          Creates an instance for binding to Tree Binder services discovered with a given query.
BinderClient(URL address)
          Creates an instance for binding to a given Tree Binder service.
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinderClient

public BinderClient(org.gcube.common.clients.Client<org.gcube.data.tm.stubs.TBinderPortType> client)
Creates an instance with a given Client.

Parameters:
client - the client

BinderClient

public BinderClient(org.gcube.common.clients.gcore.StatefulQuery query)
Creates an instance for binding to Tree Binder services discovered with a given query.

Parameters:
query - the query.

BinderClient

public BinderClient(URL address)
Creates an instance for binding to a given Tree Binder service.

Parameters:
address - the service address
Method Detail

bind

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

Specified by:
bind in interface TBinderClient
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
org.gcube.common.clients.DiscoveryException

bindAsync

public void bindAsync(BindingParameters parameters,
                      BinderConsumer consumer)
               throws IllegalArgumentException,
                      org.gcube.common.clients.DiscoveryException,
                      Exception
Binds asynchronously to T-Reader and/or T-Writer services.

Specified by:
bindAsync in interface TBinderClient
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
org.gcube.common.clients.DiscoveryException


Copyright © 2012. All Rights Reserved.