private void beforeSessionEvent ( ) throws NewSessionException { RemoteProxy p = session . getSlot ( ) . getProxy ( ) ; if ( p instanceof TestSessionListener ) { try { ( ( TestSessionListener ) p ) . beforeSession ( session ) ; } catch ( Exception e ) { log . severe ( "Error running the beforeSessionListener : " + e . getMessage ( ) ) ; e . printStackTrace ( ) ; throw new NewSessionException ( "The listener threw an exception ( listener bug )" , e ) ; } } }
calls the TestSessionListener is the proxy for that node has one specified .