站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.0.5 API 文档英文版

DelegatingConnectionFactory (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.jca.cci.connection
Class DelegatingConnectionFactory

java.lang.Object
  extended by org.springframework.jca.cci.connection.DelegatingConnectionFactory
All Implemented Interfaces:
Serializable, Referenceable, ConnectionFactory, InitializingBean
Direct Known Subclasses:
ConnectionSpecConnectionFactoryAdapter, SingleConnectionFactory, TransactionAwareConnectionFactoryProxy

public class DelegatingConnectionFactory
extends Object
implements ConnectionFactory, InitializingBean

CCI ConnectionFactory implementation that delegates all calls to a given target ConnectionFactory.

This class is meant to be subclassed, with subclasses overriding only those methods (such as getConnection()) that should not simply delegate to the target ConnectionFactory.

Since:
1.2
Author:
Juergen Hoeller
See Also:
getConnection(), Serialized Form

Constructor Summary
DelegatingConnectionFactory()
           
 
Method Summary
 void afterPropertiesSet()
          Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).
 Connection getConnection()
           
 Connection getConnection(ConnectionSpec connectionSpec)
           
 ResourceAdapterMetaData getMetaData()
           
 RecordFactory getRecordFactory()
           
 Reference getReference()
           
 ConnectionFactory getTargetConnectionFactory()
          Return the target ConnectionFactory that this ConnectionFactory should delegate to.
 void setReference(Reference reference)
           
 void setTargetConnectionFactory(ConnectionFactory targetConnectionFactory)
          Set the target ConnectionFactory that this ConnectionFactory should delegate to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingConnectionFactory

public DelegatingConnectionFactory()
Method Detail

setTargetConnectionFactory

public void setTargetConnectionFactory(ConnectionFactory targetConnectionFactory)
Set the target ConnectionFactory that this ConnectionFactory should delegate to.


getTargetConnectionFactory

public ConnectionFactory getTargetConnectionFactory()
Return the target ConnectionFactory that this ConnectionFactory should delegate to.


afterPropertiesSet

public void afterPropertiesSet()
Description copied from interface: InitializingBean
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).

This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.

Specified by:
afterPropertiesSet in interface InitializingBean

getConnection

public Connection getConnection()
                         throws ResourceException
Specified by:
getConnection in interface ConnectionFactory
Throws:
ResourceException

getConnection

public Connection getConnection(ConnectionSpec connectionSpec)
                         throws ResourceException
Specified by:
getConnection in interface ConnectionFactory
Throws:
ResourceException

getRecordFactory

public RecordFactory getRecordFactory()
                               throws ResourceException
Specified by:
getRecordFactory in interface ConnectionFactory
Throws:
ResourceException

getMetaData

public ResourceAdapterMetaData getMetaData()
                                    throws ResourceException
Specified by:
getMetaData in interface ConnectionFactory
Throws:
ResourceException

getReference

public Reference getReference()
                       throws NamingException
Specified by:
getReference in interface Referenceable
Throws:
NamingException

setReference

public void setReference(Reference reference)

The Spring Framework

Copyright © 2002-2007 The Spring Framework.