PREV CLASS
NEXT CLASS
|
|
SUMMARY: NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD |
com.ibm.portal.resolver.data
Interface ConvertibleDataSource
- All Superinterfaces:
- Addressable, DataSource, DataSourceFragment, Disposable, TimeStamped
- All Known Implementing Classes:
- AbstractDataSource
-
public interface ConvertibleDataSource
- extends DataSource
Describes a DataSource that can be converted to another
DataSource interface, typically used for type conversion of the
content.
- Since:
- 8.0.0.1
- Note:
This interface is designed to be implemented by clients. |
convertTo
<T extends DataSource> T convertTo(java.lang.Class<T> dstClass)
throws java.io.IOException
- Converts the DataSource to the desired target interface or
returns null. If the conversion is successful, the result is
a wrapper that is to be used instead of this DataSource. In
particular the wrapper has to be disposed by calling
Disposable.dispose() and this disposal will also dispose the
wrapped DataSource, it must not be disposed in addition to the
wrapper. If the conversion was not successful, the original
DataSource still needs to be disposed. This is also true in case
of an exception.
- Parameters:
- dstClass - target class, not null
- Returns:
- wrapper that implemente the target interface or null
. The wrapper needs to be disposed and its disposal will also
dispose the wrapped DataSource
- Throws:
- java.io.IOException
isConvertibleTo
boolean isConvertibleTo(java.lang.Class<? extends DataSource> dstClass)
- Checks if the DataSource can be converted to the target class.
- Parameters:
- dstClass - target class, not null
- Returns:
- true if the DataSource can be converted to
the target class, else false
PREV CLASS
NEXT CLASS
|
|
SUMMARY: NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD |