public void processNewConnection ( SocketIOChannel socket ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "processNewConnection" ) ; } VirtualConnection vc = vcf . createConnection ( ) ; TCPConnLink bc = ( TCPConnLink ) tcpChannel . getConnectionLink ( vc ) ; TCPReadRequestContextImpl bcRead = bc . getTCPReadConnLink ( ) ; bc . setSocketIOChannel ( socket ) ; ConnectionDescriptor cd = vc . getConnectionDescriptor ( ) ; Socket s = socket . getSocket ( ) ; InetAddress remote = s . getInetAddress ( ) ; InetAddress local = s . getLocalAddress ( ) ; if ( cd != null ) { cd . setAddrs ( remote , local ) ; } else { ConnectionDescriptorImpl cdi = new ConnectionDescriptorImpl ( remote , local ) ; vc . setConnectionDescriptor ( cdi ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Processing Connection: " + vc . getConnectionDescriptor ( ) ) ; } int rc = vc . attemptToSetFileChannelCapable ( VirtualConnection . FILE_CHANNEL_CAPABLE_ENABLED ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "FileChannelCapable set in VC to: " + rc ) ; } bcRead . setJITAllocateSize ( bc . getConfig ( ) . getNewConnectionBufferSize ( ) ) ; int timeout = bc . getConfig ( ) . getInactivityTimeout ( ) ; if ( timeout == ValidateUtils . INACTIVITY_TIMEOUT_NO_TIMEOUT ) { timeout = TCPRequestContext . NO_TIMEOUT ; } // Set a chain property that is used later by the SSL channel on Z only // (CRA) // This is needed to support a Z unique client certificate mapping function // which may be moved to non Z platforms in the future. vc . getStateMap ( ) . put ( "REMOTE_ADDRESS" , bc . getRemoteAddress ( ) . getHostAddress ( ) ) ; bcRead . read ( 1 , cc , true , timeout ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "processNewConnection" ) ; } }
Processes a new connection by scheduling initial read .