@Override
    public synchronized ChainData[] getAllChains(Class<?> factoryClass) throws InvalidChannelFactoryException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "getAllChains(factory)");
        }
        if (null == factoryClass) {
            throw new InvalidChannelFactoryException("Null factory class found");
        }

        String inputFactoryClassName = factoryClass.getName();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "factory=" + inputFactoryClassName);
        }

        // Collect all chains referring to the channel
        List<ChainData> chainDataList = new ArrayList<ChainData>();
        ChannelData[] channels = null;
        for (ChainData chainData : this.chainDataMap.values()) {
            // Look at each channel associated with this chain.
            channels = chainData.getChannelList();
            for (int i = 0; i < channels.length; i++) {
                if (channels[i].getFactoryType().getName().equals(inputFactoryClassName)) {
                    chainDataList.add(chainData);
                }
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "getAllChains");
        }
        return chainDataList.toArray(new ChainData[chainDataList.size()]);
    }
@ Override public synchronized ChainData [ ] getAllChains ( Class < ? > factoryClass ) throws InvalidChannelFactoryException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "getAllChains(factory)" ) ; } if ( null == factoryClass ) { throw new InvalidChannelFactoryException ( "Null factory class found" ) ; } String inputFactoryClassName = factoryClass . getName ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "factory=" + inputFactoryClassName ) ; } List < ChainData > chainDataList = new ArrayList < ChainData > ( ) ; ChannelData [ ] channels = null ; for ( ChainData chainData : this . chainDataMap . values ( ) ) { channels = chainData . getChannelList ( ) ; for ( int i = 0 ; i < channels . length ; i ++ ) { if ( channels [ i ] . getFactoryType ( ) . getName ( ) . equals ( inputFactoryClassName ) ) { chainDataList . add ( chainData ) ; } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "getAllChains" ) ; } return chainDataList . toArray ( new ChainData [ chainDataList . size ( ) ] ) ; }
/*
@see com.ibm.wsspi.channelfw.ChannelFramework#getAllChains(Class)