|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.core.PersistenceBrokerAbstractImpl
public abstract class 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.Configurable
org.apache.ojb.broker.util.configuration.ConfigurationException
Configurable.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
PersistenceBroker
PBListener
to this broker.
Note that temporary listeners will be removed upon closing a broker (returning
it to the pool).
addListener
in interface PersistenceBroker
listener
- The listener to add
PersistenceBrokerException
PersistenceBroker.addListener(PBListener listener)
public void addListener(PBListener listener, boolean permanent) throws PersistenceBrokerException
PersistenceBroker
PBListener
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 PersistenceBroker
listener
- The listener to addpermanent
- Whether the listener will stay registered after closing
the broker
PersistenceBrokerException
PersistenceBroker.addListener(PBListener listener, boolean permanent)
public void removeListener(PBListener listener) throws PersistenceBrokerException
PersistenceBroker
removeListener
in interface PersistenceBroker
listener
- The listener to remove
PersistenceBrokerException
PersistenceBroker.removeListener(PBListener listener)
public void removeAllListeners(boolean permanent) throws PersistenceBrokerException
PersistenceBroker
removeAllListeners
in interface PersistenceBroker
permanent
- Whether the listener will stay registered after closing
the broker
PersistenceBrokerException
PersistenceBroker.removeAllListeners(boolean)
public void removeAllListeners() throws PersistenceBrokerException
PersistenceBroker
removeAllListeners
in interface PersistenceBroker
PersistenceBrokerException
PersistenceBroker.removeAllListeners()
public void fireBrokerEvent(PersistenceBrokerEvent event)
PersistenceBroker
PBListener
instances.
fireBrokerEvent
in interface PersistenceBroker
event
- The event to firepublic void fireBrokerEvent(PBLifeCycleEvent event)
PersistenceBroker
PBListener
instances.
fireBrokerEvent
in interface PersistenceBroker
event
- The event to firepublic void fireBrokerEvent(PBStateEvent event)
PersistenceBroker
PBListener
instances.
fireBrokerEvent
in interface PersistenceBroker
event
- The event to fire
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |