uk.org.ogsadai.dataresource
Interface DataResourceAccessor

All Known Implementing Classes:
DemoFactoryDataResourceAccessor, DemoInstanceDataResourceAccessor, DemoTransientFactoryDataResourceAccessor, DemoTransientInstanceDataResourceAccessor, FilesDataResourceAccessor, JDBCDataResourceAccessor, SQLMultipleDataResourceAccessor, TemperatureDataResourceAccessor, TestDataResourceAccessor, XMLDBDataResourceAccessor

public interface DataResourceAccessor

Interface for a data resource accessor.

A data service resource uses a data resource accessor to mediate access to a data resource exposed by the data service resource.

Author:
The OGSA-DAI Project Team

Method Summary
 Property[] getProperties()
          Gets the resource properties associated with the data resource accessor.
 void setResourceName(java.lang.String resourceName)
          Sets the name of the resource.
 

Method Detail

setResourceName

public void setResourceName(java.lang.String resourceName)
Sets the name of the resource. This method will be called one before any other methods in this interface are called. Data resource accessors are not required to do anything with this name although it is sometimes useful to include it in any error messages.

Parameters:
resourceName - Name of the data service resource which will use this data resource accessor to mediate access to a data resource.

getProperties

public Property[] getProperties()
Gets the resource properties associated with the data resource accessor. These are made available as properties of the data service resource to which the data resource accessor belongs.

This method should be called once after the readConfig method has been called but before any other methods are called.

Returns:
The resource proporties. If there are no resource properties then a zero-sized array will be returned.