protected Channel createChannel ( ChannelData config ) throws ChannelException { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createChannel" , config ) ; Channel retChannel ; if ( config . isInbound ( ) ) { if ( tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "createChannel" , "inbound" ) ; try { Class clazz = Class . forName ( JFapChannelConstants . INBOUND_CHANNEL_CLASS ) ; Constructor contruct = clazz . getConstructor ( new Class [ ] { ChannelFactoryData . class , ChannelData . class } ) ; retChannel = ( Channel ) contruct . newInstance ( new Object [ ] { channelFactoryData , config } ) ; } catch ( Exception e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.jfapchannel.impl.JFapChannelFactory.createChannel" , JFapChannelConstants . JFAPCHANNELFACT_CREATECHANNEL_01 , this ) ; if ( tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Unable to instantiate inbound channel" , e ) ; // Rethrow as a channel exception throw new ChannelException ( e ) ; } } else { retChannel = new JFapChannelOutbound ( channelFactoryData , config ) ; } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "createChannel" , retChannel ) ; return retChannel ; }
Creates a new channel . Uses channel configuration to determine if the channel should be inbound or outbound .