Package com.portal.app.cc.event
Class CCEventMulticaster
java.lang.Object
com.portal.app.cc.event.CCEventMulticaster
- All Implemented Interfaces:
BalanceImpactListener
,BillInfoChangeListener
,ContactChangeListener
,CreditLimitListener
,DeferralChangeListener
,HierarchyChangeListener
,HoldingsChangeListener
,PaymentChangeListener
,ServiceChangeListener
,StatusChangeListener
,EventListener
public class CCEventMulticaster
extends Object
implements ContactChangeListener, BalanceImpactListener, StatusChangeListener, PaymentChangeListener, ServiceChangeListener, CreditLimitListener, DeferralChangeListener, HierarchyChangeListener, HoldingsChangeListener, BillInfoChangeListener
A class which implements efficient and thread-safe multi-cast event
dispatching for the customer care events defined in the
com.portal.app.cc.event package.
This class will manage an immutable structure consisting of a chain of
event listeners and will dispatch events to those listeners. Because
the structure is immutable, it is safe to use this API to add/remove
listeners during the process of an event dispatch operation.
- Version:
- %version: 9 % %date_modified: Thu Jun 07 17:32:00 2001 %
- Author:
- kapono
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates an event multicaster instance which chains listener-a with listener-b.Creates an event multicaster instance which chains listener-a with listener-b. -
Method Summary
Modifier and TypeMethodDescriptionAdds balance impact-listener-a with balance impact-listener-b and returns the resulting multicast listener.Adds credit limit change-listener-a with credit limit change-listener-b and returns the resulting multicast listener.Adds contact change-listener-a with contact change-listener-b and returns the resulting multicast listener.Adds credit limit change-listener-a with credit limit change-listener-b and returns the resulting multicast listener.Adds deferral change-listener-a with deferral change-listener-b and returns the resulting multicast listener.Adds hierarchy change-listener-a with hierarchy change-listener-b and returns the resulting multicast listener.Adds holdings change-listener-a with holdings change-listener-b and returns the resulting multicast listener.Adds payment change-listener-a with payment change-listener-b and returns the resulting multicast listener.Adds service change-listener-a with service change-listener-b and returns the resulting multicast listener.Adds status change-listener-a with status change-listener-b and returns the resulting multicast listener.protected EventListener
Returns the resulting multicast listener from adding listener-a and listener-b together.void
Handles the BalanceImpact event by invoking the balanceImpact methods on listener-a and listener-bvoid
Called when an event is sent out that impacts a servicevoid
Handles the ContactChange event by invoking the contactChange methods on listener-a and listener-bvoid
Handles the CreditLimitEvent by invoking the creditLimitChange methods on listener-a and listener-bvoid
Handles the DeferralChange event by invoking the deferralChange methods on listener-a and listener-bvoid
Handles the HierarchyChange event by invoking the hierarchyChange methods on listener-a and listener-bvoid
Handles the HoldingsChangeEvent by invoking the holdingsChange methods on listener-a and listener-bvoid
Handles the PaymentChangeEvent by invoking the paymentChange methods on listener-a and listener-bRemoves the old balance impact-listener from balance impact-listener-l and returns the resulting multicast listener.Removes the old credit limit change-listener from credit limit change-listener-l and returns the resulting multicast listener.Removes the old contact change-listener from contact change-listener-l and returns the resulting multicast listener.remove
(CreditLimitListener l, CreditLimitListener oldl) Removes the old credit limit change-listener from credit limit change-listener-l and returns the resulting multicast listener.Removes the old deferral change-listener from deferral change-listener-l and returns the resulting multicast listener.Removes the old hierarchy change-listener from hierarchy change-listener-l and returns the resulting multicast listener.Removes the old holdings change-listener from holdings change-listener-l and returns the resulting multicast listener.Removes the old payment change-listener from payment change-listener-l and returns the resulting multicast listener.Removes the old service change-listener from service change-listener-l and returns the resulting multicast listener.Removes the old status change-listener from status change-listener-l and returns the resulting multicast listener.protected EventListener
remove
(EventListener oldl) Removes a listener from this multicaster and returns the resulting multicast listener.protected EventListener
removeInternal
(EventListener l, EventListener oldl) Returns the resulting multicast listener after removing the old listener from listener-l.protected void
save
(ObjectOutputStream s, String k, EventListener l) protected void
void
Handles the ServiceChangeEvent by invoking the serviceChange methods on listener-a and listener-bvoid
Handles the StatusChange event by invoking the statusChange methods on listener-a and listener-b
-
Field Details
-
a
-
b
-
-
Constructor Details
-
CCEventMulticaster
public CCEventMulticaster()Creates an event multicaster instance which chains listener-a with listener-b. Input parametersa
andb
should not benull
, though implementations may vary in choosing whether or not to throwNullPointerException
in that case. -
CCEventMulticaster
Creates an event multicaster instance which chains listener-a with listener-b. Input parametersa
andb
should not benull
, though implementations may vary in choosing whether or not to throwNullPointerException
in that case.- Parameters:
a
- listener-ab
- listener-b
-
-
Method Details
-
hierarchyChange
Handles the HierarchyChange event by invoking the hierarchyChange methods on listener-a and listener-b- Specified by:
hierarchyChange
in interfaceHierarchyChangeListener
- Parameters:
e
- a HierarchyChangeEvent encapsulating the event informationThe
- hierarchy change event
-
add
Adds hierarchy change-listener-a with hierarchy change-listener-b and returns the resulting multicast listener.- Parameters:
a
- hierarchy change-listener-ab
- hierarchy change-listener-b
-
remove
Removes the old hierarchy change-listener from hierarchy change-listener-l and returns the resulting multicast listener.- Parameters:
l
- hierarchy change-listener-loldl
- the hierarchy change-listener being removed
-
holdingsChange
Handles the HoldingsChangeEvent by invoking the holdingsChange methods on listener-a and listener-b- Specified by:
holdingsChange
in interfaceHoldingsChangeListener
- Parameters:
e
- a HoldingsChangeEvent encapsulating the event informationThe
- holdings change event
-
add
Adds holdings change-listener-a with holdings change-listener-b and returns the resulting multicast listener.- Parameters:
a
- holdings change-listener-ab
- holdings change-listener-b
-
remove
Removes the old holdings change-listener from holdings change-listener-l and returns the resulting multicast listener.- Parameters:
l
- holdings change-listener-loldl
- the holdings change-listener being removed
-
deferralChange
Handles the DeferralChange event by invoking the deferralChange methods on listener-a and listener-b- Specified by:
deferralChange
in interfaceDeferralChangeListener
- Parameters:
e
- a DeferralChangeEvent encapsulating the event informationThe
- deferral change event
-
add
Adds deferral change-listener-a with deferral change-listener-b and returns the resulting multicast listener.- Parameters:
a
- deferral change-listener-ab
- deferral change-listener-b
-
remove
Removes the old deferral change-listener from deferral change-listener-l and returns the resulting multicast listener.- Parameters:
l
- deferral change-listener-loldl
- the deferral change-listener being removed
-
statusChange
Handles the StatusChange event by invoking the statusChange methods on listener-a and listener-b- Specified by:
statusChange
in interfaceStatusChangeListener
- Parameters:
e
- a StatusChangeEvent encapsulating the event informationThe
- status change event
-
add
Adds status change-listener-a with status change-listener-b and returns the resulting multicast listener.- Parameters:
a
- status change-listener-ab
- status change-listener-b
-
remove
Removes the old status change-listener from status change-listener-l and returns the resulting multicast listener.- Parameters:
l
- deferral change-listener-loldl
- the status change-listener being removed
-
balanceImpact
Handles the BalanceImpact event by invoking the balanceImpact methods on listener-a and listener-b- Specified by:
balanceImpact
in interfaceBalanceImpactListener
- Parameters:
e
- a BalanceImpactEvent encapsulating the event informationThe
- balance impact event
-
add
Adds balance impact-listener-a with balance impact-listener-b and returns the resulting multicast listener.- Parameters:
a
- balance impact-listener-ab
- balance impact-listener-b
-
remove
Removes the old balance impact-listener from balance impact-listener-l and returns the resulting multicast listener.- Parameters:
l
- balance impact-listener-loldl
- the balance impact-listener being removed
-
contactChange
Handles the ContactChange event by invoking the contactChange methods on listener-a and listener-b- Specified by:
contactChange
in interfaceContactChangeListener
- Parameters:
e
- a ContactChangeEvent encapsulating the event informationThe
- contact change event
-
add
Adds contact change-listener-a with contact change-listener-b and returns the resulting multicast listener.- Parameters:
a
- contact change-listener-ab
- contact change-listener-b
-
remove
Removes the old contact change-listener from contact change-listener-l and returns the resulting multicast listener.- Parameters:
l
- contact change-listener-loldl
- the contact change-listener being removed
-
serviceChange
Handles the ServiceChangeEvent by invoking the serviceChange methods on listener-a and listener-b- Specified by:
serviceChange
in interfaceServiceChangeListener
- Parameters:
e
- a ServiceChangeEvent encapsulating the event informationThe
- event encapsulating the service change
-
add
Adds service change-listener-a with service change-listener-b and returns the resulting multicast listener.- Parameters:
a
- service change-listener-ab
- service change-listener-b
-
remove
Removes the old service change-listener from service change-listener-l and returns the resulting multicast listener.- Parameters:
l
- service change-listener-loldl
- the service change-listener being removed
-
paymentChange
Handles the PaymentChangeEvent by invoking the paymentChange methods on listener-a and listener-b- Specified by:
paymentChange
in interfacePaymentChangeListener
- Parameters:
e
- a PaymentChangeEvent encapsulating the event informationThe
- contact change event
-
add
Adds payment change-listener-a with payment change-listener-b and returns the resulting multicast listener.- Parameters:
a
- payment change-listener-ab
- payment change-listener-b
-
remove
Removes the old payment change-listener from payment change-listener-l and returns the resulting multicast listener.- Parameters:
l
- payment change-listener-loldl
- the payment change-listener being removed
-
creditLimitChange
Handles the CreditLimitEvent by invoking the creditLimitChange methods on listener-a and listener-b- Specified by:
creditLimitChange
in interfaceCreditLimitListener
- Parameters:
e
- a CreditLimitEvent encapsulating the event informationThe
- contact change event
-
add
Adds credit limit change-listener-a with credit limit change-listener-b and returns the resulting multicast listener.- Parameters:
a
- credit limit change-listener-ab
- credit limit change-listener-b
-
remove
Removes the old credit limit change-listener from credit limit change-listener-l and returns the resulting multicast listener.- Parameters:
l
- credit limit change-listener-loldl
- the credit limit change-listener being removed
-
billInfoChange
Description copied from interface:BillInfoChangeListener
Called when an event is sent out that impacts a service- Specified by:
billInfoChange
in interfaceBillInfoChangeListener
- Parameters:
e
- a ServiceChangeEvent encapsulating the event information
-
add
Adds credit limit change-listener-a with credit limit change-listener-b and returns the resulting multicast listener.- Parameters:
a
- credit limit change-listener-ab
- credit limit change-listener-b
-
remove
Removes the old credit limit change-listener from credit limit change-listener-l and returns the resulting multicast listener.- Parameters:
l
- credit limit change-listener-loldl
- the credit limit change-listener being removed
-
remove
Removes a listener from this multicaster and returns the resulting multicast listener.- Parameters:
oldl
- the listener to be removed
-
addInternal
Returns the resulting multicast listener from adding listener-a and listener-b together. If listener-a is null, it returns listener-b; If listener-b is null, it returns listener-a If neither are null, then it creates and returns a new CCEventMulticaster instance which chains a with b.- Parameters:
a
- event listener-ab
- event listener-b
-
removeInternal
Returns the resulting multicast listener after removing the old listener from listener-l. If listener-l equals the old listener OR listener-l is null, returns null. Else if listener-l is an instance of CCEventMulticaster, then it removes the old listener from it. Else, returns listener l.- Parameters:
l
- the listener being removed fromoldl
- the listener being removed
-
saveInternal
- Throws:
IOException
-
save
- Throws:
IOException
-