DESY ACOP Beans Home

de.desy.acop.transport.adapters
Interface AdapterFactory

All Known Implementing Classes:
DefaultAdapterFactory

public interface AdapterFactory

Author:
Jaka Bobnar, Cosylab

Method Summary
 void clear()
          Destroys all data source and clears all cache information.
 AcopTransportDataSource createDataSource(ConnectionParameters param)
          Returns data source for parameters and increases use count for that data source for 1.
 java.util.Map<java.lang.String,java.lang.Object> getCharacteristics(ConnectionParameters param)
          Method returns the characteristics for specified parameters.
 AcopTransportDataSource getDataSource(ConnectionParameters param)
          Returns adapter assotiated with the parameters, does not increase use count.
 void releaseDataSource(AcopTransportDataSource ds)
          Decreases use count on data source.
 AcopTransportDataSource releaseDataSource(ConnectionParameters param)
          Decreases use count on data source associated with parameters.
 

Method Detail

createDataSource

AcopTransportDataSource createDataSource(ConnectionParameters param)
                                         throws ConnectionFailed
Returns data source for parameters and increases use count for that data source for 1. If adapter does not already exists, it is created.

Parameters:
param - parameters for the data source
Returns:
data source
Throws:
ConnectionFailed

getDataSource

AcopTransportDataSource getDataSource(ConnectionParameters param)
                                      throws ConnectionFailed
Returns adapter assotiated with the parameters, does not increase use count. If no data source is associated, then create is called.

Parameters:
param - parameters for the data source
Returns:
Throws:
ConnectionFailed

releaseDataSource

void releaseDataSource(AcopTransportDataSource ds)
Decreases use count on data source. If use count reaches 0, then destroys data source and releases all handles to the data source.

Parameters:
ds - data source to be destroyed

releaseDataSource

AcopTransportDataSource releaseDataSource(ConnectionParameters param)
Decreases use count on data source associated with parameters. If use count reaches 0, then destroys data source and releases all handles to the data source.

Parameters:
param -
Returns:
released DataSource

clear

void clear()
Destroys all data source and clears all cache information.


getCharacteristics

java.util.Map<java.lang.String,java.lang.Object> getCharacteristics(ConnectionParameters param)
                                                                    throws ConnectionFailed
Method returns the characteristics for specified parameters. Characteristics should be read from cache (from DataSource) if DataSource associated with these parameters exists. If not, characteristics should be obtained by other means.

Parameters:
param -
Returns:
Throws:
ConnectionFailed


Copyright © 2010. All Rights Reserved.