public void startReadListener ( ThreadContextManager tcm , SRTInputStream31 inputStream ) throws Exception { try { ReadListenerRunnable rlRunnable = new ReadListenerRunnable ( tcm , inputStream , this ) ; this . setReadListenerRunning ( true ) ; com . ibm . ws . webcontainer . osgi . WebContainer . getExecutorService ( ) . execute ( rlRunnable ) ; // The read listener will now be invoked on another thread. Call pre-join to // notify interested components that this will be happening. It's possible that // the read listener may run before the pre-join is complete, and callers need to // be able to cope with that. notifyITransferContextPreProcessWorkState ( ) ; } catch ( Exception e ) { this . setReadListenerRunning ( false ) ; throw e ; } }
A read listener has been set on the SRTInputStream and we will set it up to do its first read on another thread .