public abstract class PersistenceBrokerAbstractImpl extends java.lang.Object implements PersistenceBrokerInternal
PersistenceBroker
encapsulating the used PB-event/listener concept.PersistenceBroker,
PBLifeCycleListener,
PersistenceBrokerAware,
PBStateListener| Constructor and Description |
|---|
PersistenceBrokerAbstractImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(PBListener listener)
Adds a temporary
PBListener to this broker. |
void |
addListener(PBListener listener,
boolean permanent)
Adds a temporary or permanent
PBListener to this broker,
depending on the parameter value. |
void |
configure(org.apache.ojb.broker.util.configuration.Configuration pConfig)
Override if needed.
|
void |
fireBrokerEvent(PBLifeCycleEvent event)
Fires a life cycle event to inform all registered
PBListener instances. |
void |
fireBrokerEvent(PBStateEvent event)
Fires a state event to inform all registered
PBListener instances. |
void |
fireBrokerEvent(PersistenceBrokerEvent event)
Fires a broker event to inform all registered
PBListener instances. |
boolean |
isTxCheck()
Returns true if the development checks are enabled.
|
void |
removeAllListeners()
Removes all temporary listeners from this broker.
|
void |
removeAllListeners(boolean permanent)
Removes all temporary and, if desired, permanent listeners from this broker.
|
void |
removeListener(PBListener listener)
Removes the specified listener from this broker.
|
void |
setTxCheck(boolean txCheck)
This setting can be helpful during development if the PersistenceBroker transaction
demarcation was used (this is true in most cases).
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckRefreshRelationships, createProxy, delete, getProxyFactory, getReferenceBroker, getRelationshipPrefetcherFactory, isManaged, setManaged, storeabortTransaction, addMtoNImplementor, beginTransaction, clearCache, close, commitTransaction, delete, deleteByQuery, deleteMtoNImplementor, getClassDescriptor, getCollectionByQuery, getCollectionByQuery, getCount, getDescriptorRepository, getIteratorByQuery, getObjectByIdentity, getObjectByQuery, getPBKey, getPKEnumerationByQuery, getReportQueryIteratorByQuery, getTopLevelClass, hasClassDescriptor, isClosed, isInTransaction, removeFromCache, retrieveAllReferences, retrieveReference, serviceBrokerHelper, serviceConnectionManager, serviceIdentity, serviceJdbcAccess, serviceObjectCache, serviceSequenceManager, serviceSqlGenerator, serviceStatementManager, store, storequerypublic void configure(org.apache.ojb.broker.util.configuration.Configuration pConfig)
throws org.apache.ojb.broker.util.configuration.ConfigurationException
configure in interface org.apache.ojb.broker.util.configuration.ConfigurablepConfig - the Configuration object used to configure current instanceorg.apache.ojb.broker.util.configuration.ConfigurationExceptionConfigurable.configure(Configuration)public boolean isTxCheck()
setTxCheck(boolean)public void setTxCheck(boolean txCheck)
txCheck - Set true to enable the checkspublic void addListener(PBListener listener) throws PersistenceBrokerException
PersistenceBrokerPBListener to this broker.
Note that temporary listeners will be removed upon closing a broker (returning
it to the pool).addListener in interface PersistenceBrokerlistener - The listener to addPersistenceBrokerExceptionPersistenceBroker.addListener(PBListener listener)public void addListener(PBListener listener, boolean permanent) throws PersistenceBrokerException
PersistenceBrokerPBListener to this broker,
depending on the parameter value. Note that temporary listeners will be removed upon
closing a broker (returning it to the pool).
PersistenceBrokerFactoryIF or extend the default
one, PersistenceBrokerFactoryDefaultImpl. There you
can add the listener at creation of the PersistenceBroker
instances.addListener in interface PersistenceBrokerlistener - The listener to addpermanent - Whether the listener will stay registered after closing
the brokerPersistenceBrokerExceptionPersistenceBroker.addListener(PBListener listener, boolean permanent)public void removeListener(PBListener listener) throws PersistenceBrokerException
PersistenceBrokerremoveListener in interface PersistenceBrokerlistener - The listener to removePersistenceBrokerExceptionPersistenceBroker.removeListener(PBListener listener)public void removeAllListeners(boolean permanent)
throws PersistenceBrokerException
PersistenceBrokerremoveAllListeners in interface PersistenceBrokerpermanent - Whether the listener will stay registered after closing
the brokerPersistenceBrokerExceptionPersistenceBroker.removeAllListeners(boolean)public void removeAllListeners()
throws PersistenceBrokerException
PersistenceBrokerremoveAllListeners in interface PersistenceBrokerPersistenceBrokerExceptionPersistenceBroker.removeAllListeners()public void fireBrokerEvent(PersistenceBrokerEvent event)
PersistenceBrokerPBListener instances.fireBrokerEvent in interface PersistenceBrokerevent - The event to firepublic void fireBrokerEvent(PBLifeCycleEvent event)
PersistenceBrokerPBListener instances.fireBrokerEvent in interface PersistenceBrokerevent - The event to firepublic void fireBrokerEvent(PBStateEvent event)
PersistenceBrokerPBListener instances.fireBrokerEvent in interface PersistenceBrokerevent - The event to fire(C) 2002 - 2005 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30