|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ojb.broker.core.PersistenceBrokerAbstractImpl
Abstract Implementation of the PersistenceBroker
encapsulating the used PB-event/listener concept.
PersistenceBroker,
PBLifeCycleListener,
PersistenceBrokerAware,
PBStateListener| Constructor Summary | |
PersistenceBrokerAbstractImpl()
|
|
| Method Summary | |
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). |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.ojb.broker.PersistenceBrokerInternal |
checkRefreshRelationships, createProxy, delete, getProxyFactory, getReferenceBroker, getRelationshipPrefetcherFactory, isManaged, setManaged, store |
| Methods inherited from interface org.odbms.ObjectContainer |
query |
| Constructor Detail |
public PersistenceBrokerAbstractImpl()
| Method Detail |
public 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.Configurableorg.apache.ojb.broker.util.configuration.ConfigurationExceptionConfigurable.configure(Configuration)public boolean isTxCheck()
setTxCheck(boolean)public void setTxCheck(boolean txCheck)
txCheck - Set true to enable the checks
public 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 add
PersistenceBrokerExceptionPersistenceBroker.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 broker
PersistenceBrokerExceptionPersistenceBroker.addListener(PBListener listener, boolean permanent)
public void removeListener(PBListener listener)
throws PersistenceBrokerException
PersistenceBroker
removeListener in interface PersistenceBrokerlistener - The listener to remove
PersistenceBrokerExceptionPersistenceBroker.removeListener(PBListener listener)
public void removeAllListeners(boolean permanent)
throws PersistenceBrokerException
PersistenceBroker
removeAllListeners in interface PersistenceBrokerpermanent - Whether the listener will stay registered after closing
the broker
PersistenceBrokerExceptionPersistenceBroker.removeAllListeners(boolean)
public void removeAllListeners()
throws PersistenceBrokerException
PersistenceBroker
removeAllListeners 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||