com.wiley.posa3.pooling
Class ConnectionAdapter

java.lang.Object
  extended bycom.wiley.posa3.pooling.ConnectionAdapter
All Implemented Interfaces:
Resource

public class ConnectionAdapter
extends java.lang.Object
implements Resource

A ConnectionAdapter class is used for legacy code integration, where it may not be possible to have the resource implement the Resource interface. The ConnectionAdapter class implements the Resource interface and then wraps the actual resource. The context information is also maintained by the ConnectionAdapter class.

Version:
1.0
Author:
Michael Kircher, Prashant Jain

Constructor Summary
ConnectionAdapter(Connection connection)
          Constuctor.
ConnectionAdapter(Connection connection, Identity id)
          Constuctor.
 
Method Summary
 Connection getConnection()
          Get the connection object
 Identity getId()
          Get the identity of this resource
 void method1()
          Some generic method.
 void method2()
          Some generic method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionAdapter

public ConnectionAdapter(Connection connection)
Constuctor.

Parameters:
connection - the connection object that we are adapting/wrapping.

ConnectionAdapter

public ConnectionAdapter(Connection connection,
                         Identity id)
Constuctor.

Parameters:
connection - the connection object that we are adapting/wrapping.
id - a unique identifier for this connection.
Method Detail

getId

public Identity getId()
Get the identity of this resource

Specified by:
getId in interface Resource
Returns:
The identity of this resource

getConnection

public Connection getConnection()
Get the connection object

Returns:
The connection object

method1

public void method1()
Some generic method.

Specified by:
method1 in interface Resource

method2

public void method2()
Some generic method.

Specified by:
method2 in interface Resource


Copyright 2004 John Wiley and Sons. All Rights Reserved.