protected void processAuthedConnections ( long iterStamp ) { AuthingConnection conn ; while ( ( conn = _authq . getNonBlocking ( ) ) != null ) { try { // construct a new running connection to handle this connections network traffic // from here on out PresentsConnection rconn = new PresentsConnection ( ) ; rconn . init ( this , conn . getChannel ( ) , iterStamp ) ; rconn . selkey = conn . selkey ; // we need to keep using the same object input and output streams from the // beginning of the session because they have context that needs to be preserved rconn . inheritStreams ( conn ) ; // replace the mapping in the handlers table from the old conn with the new one _handlers . put ( rconn . selkey , rconn ) ; // add a mapping for the connection id and set the datagram secret _connections . put ( rconn . getConnectionId ( ) , rconn ) ; rconn . setDatagramSecret ( conn . getAuthRequest ( ) . getCredentials ( ) . getDatagramSecret ( ) ) ; // transfer any overflow queue for that connection OverflowQueue oflowHandler = _oflowqs . remove ( conn ) ; if ( oflowHandler != null ) { _oflowqs . put ( rconn , oflowHandler ) ; } // and let the client manager know about our new connection _clmgr . connectionEstablished ( rconn , conn . getAuthName ( ) , conn . getAuthRequest ( ) , conn . getAuthResponse ( ) ) ; } catch ( IOException ioe ) { log . warning ( "Failure upgrading authing connection to running." , ioe ) ; } } }
Converts connections that have completed the authentication process into full running connections and notifies the client manager that new connections have been established .