Since this class mostly concerns itself with converting a transport-specific message representation to a {@link Packet}, the name is the "adapter".
The purpose of this class is twofolds:
{@link Adapter}s are extended to work with each kind of transport, and therefore {@link Adapter} class itself is not all thatuseful by itself --- it merely provides a design template that can be followed.
For managing resources, an adapter uses an object called {@link Toolkit}(think of it as a tray full of tools that a dentist uses --- trays are identical, but each patient has to get one. You have a pool of them and you assign it to a patient.) {@link Adapter.Toolkit} can be extended by derived classes.That actual type is the {@code TK} type parameter this class takes. @author Kohsuke Kawaguchi
Adapter
is called from receivers. He is responsible for creating the appropriate Message
object, calling the appropriate object and method of the application layer and logging the call in the DBJournal
.
DB
defines the interface for a Torque database adapter. Support for new databases is added by implementing this interface. A couple of default settings is provided by subclassing AbstractDBAdapter
. The new database adapter and its corresponding JDBC driver need to be registered in the service configuration file. The Torque database adapters exist to present a uniform interface to database access across all available databases. Once the necessary adapters have been written and configured, transparent swapping of databases is theoretically supported with zero code changes and minimal configuration file modifications. All database adapters need to be thread safe, as they are instantiated only once fore a given configured database and may be accessed simultaneously from several threads. * @author Jon S. Stevens @author Brett McLaughlin @author Daniel Rall @author Augustin Vidovic @author Thomas Vandahl @author Greg Monroe @version $Id: Adapter.java 1450486 2013-02-26 22:18:00Z tfischer $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|