Interface Connector
- All Known Subinterfaces:
PoolableConnector
public interface Connector
This is the main interface to declare a connector. Developers must implement
this interface. The life-cycle for a
Connector
is as follows
init(Configuration)
is called then any of the operations implemented
in the Connector and finally dispose. The init(Configuration)
and
dispose()
allow for block operations. For instance bulk creates or
deletes and the use of before and after actions. Once dispose()
is
called the Connector
object is discarded.-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Dispose of any resources theConnector
uses.Return the configuration that was passed toinit(Configuration)
.void
init
(Configuration cfg) Initialize the connector with its configuration.
-
Method Details
-
getConfiguration
Configuration getConfiguration()Return the configuration that was passed toinit(Configuration)
.- Returns:
- The configuration that was passed to
init(Configuration)
.
-
init
Initialize the connector with its configuration. For instance in a JDBCConnector
this would include the database URL, password, and user.- Parameters:
cfg
- instance of theConfiguration
object implemented by theConnector
developer and populated with information in order to initialize theConnector
.
-
dispose
void dispose()Dispose of any resources theConnector
uses.
-