On 9 February 2011 08:41, Lance Ingram <[email protected]> wrote:
> Hi Sebb
>
> Yes I agree a Listener must merely listen to a sampler.
>
> My listener listens to JDNI Queue on a web server, where the sampler will be
> sending its request too. As an independent peace of application it works.
>
> I was requested to create a plugin to JMeter where it will do the same
> functionality as described above.

As I wrote before, you need to create a *sampler* to connect to the queue.

The sampler will generate a sample result which can be displayed in
any of the Listeners.

> If I look at the ViewResultsFullVisualizer.java file which is "View Results
> Tree" Listener
>
> GUI class signature:  *public* *class* *JMeterCustomListenerGui*
> *extends*AbstractVisualizer
> *implements* NoThreadClone
> Listener class signature: *public* *class* JMeterCustomListener
> *implements*NoThreadClone
> In which GUI method will allow me to just to create one listener instead of
> creating multiples.

If you need to do something once per test, have a look at the
TestListener interface.

> Highly Confused
> Lance
>
> On Tue, Feb 8, 2011 at 5:32 PM, sebb <[email protected]> wrote:
>
>> On 8 February 2011 12:25, Lance Ingram <[email protected]> wrote:
>> > Hi Sebb
>> >
>> > Thanks for the response again and your willingness to assit me I do
>> > appreciate your time.
>> >
>> > I am *struggling* to get use to *JMeter structure* since its so
>> abstracted.
>> >
>> > Yes I have looked at SummaryReport and ViewResultsFullVisualizer as my
>> base
>> > structure and noted that gui and code in one class file.
>> >
>> > My listener needs information so my gui is similar to "JMS Point to
>> Point"
>> > sampler where I tell my listener which information it must use to listen
>> on.
>>
>> JMeter Listeners are for processing sample results - they "listen" to
>> samplers which generate the data they process.
>>
>> They are not intended for accessing external items - you need to use a
>> Sampler for that.
>>
>> > I have two classes one the GUI which extends from AbstractVisualizer as
>> the
>> > listeners above and my listener class which implements NoThreadClone
>> >
>> > Your guidance would be appreciated
>> >
>> >
>> > Thanks in advance and Regards
>> > Lance
>> >
>> >
>> > On Tue, Feb 8, 2011 at 1:59 PM, sebb <[email protected]> wrote:
>> >
>> >> On 8 February 2011 09:28, Lance Ingram <[email protected]> wrote:
>> >> > Hi Sebb
>> >> >
>> >> >
>> >> > I am fairly new in the JMeter plugin development I appreciate your
>> >> response.
>> >>
>> >> Have a look at some other Listeners.
>> >>
>> >> > In terms: "I don't follow that. The add(SampleResult) method is called
>> >> for
>> >> > each
>> >> > sample, and does not create a new instance"
>> >> >> Just to brng more clarity to the question above the
>> AbstractVisualizer
>> >> the
>> >> > add(SampleResult) must be implemented I instatiated my listener class
>> in
>> >> the
>> >> > method.
>> >> >> It seems that for each sampelr call this add() function was called by
>> >> > placing some output to the console there. Is my assumption correct?
>> >>
>> >> Yes, the add() method is the way the samples are provided for the
>> screen.
>> >>
>> >> >
>> >> >
>> >> >> I will implement the NoThreadClone
>> >> > Thanks and Regards
>> >> > Lance
>> >> >
>> >> >
>> >> > On Mon, Feb 7, 2011 at 4:28 PM, sebb <[email protected]> wrote:
>> >> >
>> >> >> On 7 February 2011 12:33, Lance Ingram <[email protected]>
>> wrote:
>> >> >> > Hi All
>> >> >> >
>> >> >> >
>> >> >> > I am busy developing a JMeter plug-in and I wanted to know whether
>> >> it’s
>> >> >> > possible for a listener to be instantiated only once? I have
>> >> investigated
>> >> >> > summary_report code and I noted that the add (SampleTest) is
>> created
>> >> for
>> >> >> > each sampler which is called thus creating my listener multiple
>> times.
>> >> >>
>> >> >>  I don't follow that. The add(SampleResult) method is called for each
>> >> >> sample, and does not create a new instance.
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> >> > I just want to be able to start the listener once and wait upon the
>> >> >> sampler
>> >> >> > request.
>> >> >> >
>> >> >>
>> >> >> Have look at the NoThreadClone interface.
>> >> >>
>> >> >> >
>> >> >> > Is this possible? If so which class or listener must I base my code
>> on
>> >> as
>> >> >> an
>> >> >> > example for JMeter.
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > Thank and Regards
>> >> >> >
>> >> >> > Lance
>> >> >> >
>> >> >>
>> >> >> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: [email protected]
>> >> >> For additional commands, e-mail: [email protected]
>> >> >>
>> >> >>
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [email protected]
>> >> For additional commands, e-mail: [email protected]
>> >>
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to