1 18 19 package org.apache.jmeter.samplers; 20 21 import java.io.Serializable ; 22 import java.rmi.RemoteException ; 23 24 import org.apache.jmeter.engine.util.NoThreadClone; 25 import org.apache.jmeter.testelement.AbstractTestElement; 26 import org.apache.jorphan.logging.LoggingManager; 27 import org.apache.log.Logger; 28 29 33 34 public class RemoteSampleListenerWrapper 35 extends AbstractTestElement 36 implements SampleListener, Serializable , NoThreadClone 37 { 38 transient private static Logger log = LoggingManager.getLoggerForClass(); 39 RemoteSampleListener listener; 40 41 public RemoteSampleListenerWrapper(RemoteSampleListener l) 42 { 43 listener = l; 44 } 45 46 public RemoteSampleListenerWrapper() 47 { 48 } 49 50 public void sampleOccurred(SampleEvent e) 51 { 52 try 53 { 54 listener.sampleOccurred(e); 55 } 56 catch (RemoteException err) 57 { 58 log.error("", err); 59 } 60 } 61 public void sampleStarted(SampleEvent e) 62 { 63 try 64 { 65 listener.sampleStarted(e); 66 } 67 catch (RemoteException err) 68 { 69 log.error("", err); 70 } 71 } 72 public void sampleStopped(SampleEvent e) 73 { 74 try 75 { 76 listener.sampleStopped(e); 77 } 78 catch (RemoteException err) 79 { 80 log.error("", err); 81 } 82 } 83 } | Popular Tags |