|
||||||||||
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 PersistenceBroker instance - when PersistenceBroker.close() was
called the listener was removed. |
void |
addListener(PBListener listener,
boolean permanent)
Adds a permanent PBListener
to this PersistenceBroker instance if parameter permanent
was true . |
void |
configure(org.apache.ojb.broker.util.configuration.Configuration pConfig)
Override if needed. |
void |
fireBrokerEvent(PBLifeCycleEvent event)
Performs a broker event to inform all managed PBListener implementations. |
void |
fireBrokerEvent(PBStateEvent event)
Performs a broker event to inform all managed PBListener implementations. |
void |
fireBrokerEvent(PersistenceBrokerEvent event)
Performs a broker event to inform all managed PBListener implementations. |
void |
removeAllListeners()
Removes all temporary listeners from this PersistenceBroker instance - Handle with care! |
void |
removeAllListeners(boolean permanent)
If parameter permanet was true all permanent and temporary listeners
will be removed from this PersistenceBroker instance. |
void |
removeListener(PBListener listener)
Removes a listener from this PersistenceBroker instance |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 void addListener(PBListener listener) throws PersistenceBrokerException
PersistenceBroker
PBListener
to this PersistenceBroker instance - when PersistenceBroker.close() was
called the listener was removed.
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 PersistenceBroker instance if parameter permanent
was true
. This means the listener will be
hold the whole life time of the broker.
PersistenceBrokerFactoryIF
or extend the default
implementation PersistenceBrokerFactoryDefaultImpl
and add the listener at creation of the PersistenceBroker
instances.
addListener
in interface PersistenceBroker
PersistenceBrokerException
PersistenceBroker.addListener(PBListener listener, boolean permanent)
public void removeListener(PBListener listener) throws PersistenceBrokerException
PersistenceBroker
removeListener
in interface PersistenceBroker
listener
-
PersistenceBrokerException
PersistenceBroker.removeListener(PBListener listener)
public void removeAllListeners(boolean permanent) throws PersistenceBrokerException
PersistenceBroker
permanet
was true
all permanent and temporary listeners
will be removed from this PersistenceBroker instance.
removeAllListeners
in interface PersistenceBroker
PersistenceBrokerException
PersistenceBroker.removeAllListeners(boolean)
public void removeAllListeners() throws PersistenceBrokerException
PersistenceBroker
removeAllListeners
in interface PersistenceBroker
PersistenceBrokerException
PersistenceBroker.removeAllListeners()
public void fireBrokerEvent(PersistenceBrokerEvent event)
PersistenceBroker
PBListener
implementations.
fireBrokerEvent
in interface PersistenceBroker
public void fireBrokerEvent(PBLifeCycleEvent event)
PersistenceBroker
PBListener
implementations.
fireBrokerEvent
in interface PersistenceBroker
public void fireBrokerEvent(PBStateEvent event)
PersistenceBroker
PBListener
implementations.
fireBrokerEvent
in interface PersistenceBroker
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |