public final void addChainEventListener ( ChainEventListener listener ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "addChainEventListener: " + listener ) ; } if ( ( null != listener ) && ( ! getChainEventListeners ( ) . contains ( listener ) ) ) { // Add the listener to the set monitored by this group. getChainEventListeners ( ) . add ( listener ) ; // Add the listener to each of the chains in this group. // Extract the chain data array from the group data object for ( ChainData chain : getChains ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Adding listener to chain, " + chain . getName ( ) ) ; } ( ( ChainDataImpl ) chain ) . addChainEventListener ( listener ) ; } } }
Method addChainEventListener . Enables external entities to be notified of chain events on each of the chains in the group described in ChainEventListener interface .