2

I'm using Jetty 8.1.8.

I'd like to be able to record when a new persistent connection is opened, how many requests/responses are sent over the persistent connection, and when the persistent connection is closed.

In other words, how can I determine the average number of requests/responses sent over a persistent HTTP connection to my Jetty server?

I have a feeling it may be something todo with the AbstractLifeCycle class, but I can't find much documentation on it and the Javadocs are fairly spartan.

sanity
  • 35,347
  • 40
  • 135
  • 226

1 Answers1

0

LifeCycle interface is fairly basic , as you can use to register start, stop, failed, etc but not really requests/response to my knowledge.

I did do a research and found that this might be the best for you

JavaDoc Jetty 8 - requestLog interface

It's super interface is LifeCycle.

If you still do need to use AbstractLifecycle , simply "implements " it :) and override methods and watch for String based events (STOPPED , etc) , its all in the java doc.

Here you go

Abstract Life Cycle - java doc

jeveloper
  • 890
  • 8
  • 10