org.gcube.data.tmf.api
Interface SourceBinder


public interface SourceBinder

Binds the plugin to data sources in response to client requests.

A binder provides the service with Source models of the bound data sources, pre-configured with the information required by the service to manage the sources on behalf of the plugin.

Author:
Fabio Simeoni
See Also:
Source

Method Summary
 List<? extends Source> bind(Element request)
          Binds one or more data sources in response to client requests, returning Source models of the bound sources to the service.
 

Method Detail

bind

List<? extends Source> bind(Element request)
                            throws org.gcube.common.clients.exceptions.InvalidRequestException,
                                   Exception
Binds one or more data sources in response to client requests, returning Source models of the bound sources to the service.

Implementations should validate requests and return Sources as soon as these can be identified from the requests. Sources should be instead initialised in SourceLifecycle.init()), if and when the service requires it. Doing otherwise may result in unnecessary work because the service may recognise that a Source instance with the same identifier has been previously bound by the plugin. In this case, the service discards the new instance and invokes SourceLifecycle.reconfigure(Element)) on the old instance.

Parameters:
request - the client request
Returns:
the bound sources
Throws:
org.gcube.common.clients.exceptions.InvalidRequestException - if the request is invalid
Exception - if operation fails for any other error
See Also:
SourceLifecycle


Copyright © 2012. All Rights Reserved.