com.davisor.data.stream
Interface DataSource

All Superinterfaces:
Data
All Known Subinterfaces:
DataBuffer
All Known Implementing Classes:
CollectionDataSource, IndirectDataBuffer, JoinedDataBuffer, ListDataBuffer, SimpleDataBuffer, StreamDataSource

public interface DataSource
extends Data

DataSource defines an interface for classes that can express their content as data streams. A data source should support multiple simultaneous data streams by default, although implementing classes may also enforce different synchronization policies.

Since:
JDK1.1
See Also:
DataBuffer, Type

Method Summary
 boolean close()
          After data soruce is no longer used, freeing resources can be requested explicitely by calling this method.
 DataStream getStream()
          Gets a new data stream from the data source.
 java.lang.String toString(java.lang.String id, java.lang.String dataName)
          Returns a String representation of the DataSource.
 
Methods inherited from interface com.davisor.data.Data
getType
 

Method Detail

close

public boolean close()
After data soruce is no longer used, freeing resources can be requested explicitely by calling this method.

Data streams that have already been retrieved from this data source may or may not be readable after this method call. Refer to the individual data source documention for details.

Note also that this method does not explicitely declare any expections. If closing fails, data source may return false to indicate a failure.

Returns:
a false boolean may be returned, if closing data source was a failure.

getStream

public DataStream getStream()
                     throws InvalidDataException
Gets a new data stream from the data source.

Throws:
InvalidDataException

toString

public java.lang.String toString(java.lang.String id,
                                 java.lang.String dataName)
Returns a String representation of the DataSource. The possible id and dataname are is overridden with the given calues.



Copyright © 2001-2004 Davisor Oy. All Rights Reserved.