org.imemex.datasourceplugins
Class AbstractDataSourcePlugin

java.lang.Object
  extended by org.imemex.datasourceplugins.AbstractDataSourcePlugin
All Implemented Interfaces:
DataSourcePlugin
Direct Known Subclasses:
GeneratedDataSourcePlugin, GenericFilesystem, IMAP, JDBCDataSourcePlugin, WebXML

public abstract class AbstractDataSourcePlugin
extends java.lang.Object
implements DataSourcePlugin

This abstract implementation of a data source plugin fulfills the following purposes:

Author:
some one

Constructor Summary
AbstractDataSourcePlugin()
           
 
Method Summary
 void close()
          Closes this plugin.
 void deRegisterDataSource(long dataSourceID)
          deregisters a data source at the plugin
 void registerDataSource(java.net.URI dataSource, long dataSourceID)
          registers a data source at the plugin.
 void subscribeToChangeEvents(long dataSourceID, PushOperator<Event> subscription)
          TODO: post VLDB Subscribes to change events for the given data source (PUSH model).
 boolean supportsPull()
          Determines whether this implementation supports the PULL model.
 boolean supportsPush()
          Determines whether this implementation supports the PUSH model.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.imemex.datasourceplugins.DataSourcePlugin
allResourceViews, getChangeEvents, getResourceView, getSupportedProtocols, isDataSourceAcyclic, isSchemeSupported, query, queryAfterDate, queryAfterDate
 

Constructor Detail

AbstractDataSourcePlugin

public AbstractDataSourcePlugin()
Method Detail

registerDataSource

public final void registerDataSource(java.net.URI dataSource,
                                     long dataSourceID)
                              throws DataSourceAlreadyExistsException
Description copied from interface: DataSourcePlugin
registers a data source at the plugin.

Specified by:
registerDataSource in interface DataSourcePlugin
Throws:
DataSourceAlreadyExistsException

deRegisterDataSource

public final void deRegisterDataSource(long dataSourceID)
                                throws NoSuchDataSourceException
Description copied from interface: DataSourcePlugin
deregisters a data source at the plugin

Specified by:
deRegisterDataSource in interface DataSourcePlugin
Throws:
NoSuchDataSourceException - TODO

subscribeToChangeEvents

public void subscribeToChangeEvents(long dataSourceID,
                                    PushOperator<Event> subscription)
                             throws NoSuchDataSourceException
Description copied from interface: DataSourcePlugin
TODO: post VLDB Subscribes to change events for the given data source (PUSH model). Returns a PullOperator of ChangedResourceViewMetaData instances.

Specified by:
subscribeToChangeEvents in interface DataSourcePlugin
subscription - TODO
Throws:
NoSuchDataSourceException - TODO

supportsPull

public boolean supportsPull()
Description copied from interface: DataSourcePlugin
Determines whether this implementation supports the PULL model.

Specified by:
supportsPull in interface DataSourcePlugin
Returns:
true is returned if this group supports pull iterators.
See Also:
PullOperator

supportsPush

public boolean supportsPush()
Description copied from interface: DataSourcePlugin
Determines whether this implementation supports the PUSH model.

Specified by:
supportsPush in interface DataSourcePlugin
Returns:
true is returned if this group supports push iterators.
See Also:
PushOperator

close

public void close()
Description copied from interface: DataSourcePlugin
Closes this plugin. This method is a replacement for the missing destructor in Java. (finalize() is not called in all cases!)

Specified by:
close in interface DataSourcePlugin