public void run ( ) { try { // Open connection to URL calling this interceptor. HttpURLConnection connection = ( HttpURLConnection ) url . openConnection ( ) ; // Pass in the session id cookie to maintain the same session. log . trace ( "passing in cookies: " , cookies ) ; connection . setRequestProperty ( "Cookie" , cookies ) ; // Invoke event in background. byte [ ] buff = new byte [ 1024 * 4 ] ; InputStream input = connection . getInputStream ( ) ; try { while ( input . read ( buff ) > - 1 ) ; } finally { input . close ( ) ; } } catch ( Exception e ) { // Log any exception that could have occurred. log . error ( e ) ; } }
Invoke event in a background request .