It needs to implement the appropriate interface, i.e.

org.apache.jmeter.samplers.SampleListener

This should be enough for JMeter to add it to the list of listeners.

S.
>-----Original Message-----
>From: Cameron Taggart [mailto:[EMAIL PROTECTED]
>Sent: 25 February 2004 03:00
>To: [EMAIL PROTECTED]
>Subject: customer SampleListener
>
>
>Following the directions at 
>http://jakarta.apache.org/jmeter/extending/#listener, I've created my 
>own class named LoggingSampleListner which implement SampleListener.  
>For now, I just want the listener to log out some info via Log4J.  I 
>compiled the class, put it in a jar and put the lib\etc 
>directory.  What 
>else must I do to enable this very basic listener?
>
>Thanks,
>Cameron
>
>  private static final Logger logger = Logger.getLogger( 
>LoggingSampleListener.class );
>
>  public void sampleOccurred( SampleEvent e ) {
>    SampleResult r = e.getResult(  );
>    byte[]       b = r.getResponseData(  );
>    logger.info( "sampleOccured(), " + new String( b ) );
>    System.out.println( "sampleOccured()");
>  }
>
>  public void sampleStarted( SampleEvent e ) {
>    logger.info( "sampleStarted() ");
>    System.out.println( "sampleStarted()");
>  }
>
>  public void sampleStopped( SampleEvent e ) {
>    logger.info( "sampleStopped() ");
>    System.out.println( "sampleStopped()");
>  }
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


___________________________________________________________________________

This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail in
error, please notify the sender immediately and destroy it. As its integrity
cannot be secured on the Internet, the Atos Origin group liability cannot be
triggered for the message content. Although the sender endeavours to maintain
a computer virus-free network, the sender does not warrant that this
transmission is virus-free and will not be liable for any damages resulting
from any virus transmitted. 
___________________________________________________________________________


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to