Class SessionlessApplicationMonitor

  • All Implemented Interfaces:
    ApplicationEventListener

    public final class SessionlessApplicationMonitor
    extends java.lang.Object
    Application events listener and statistics collector. The statistics are collected by aggregating statistics from application endpoints. The only difference form SessionAwareApplicationMonitor is that SessionAwareApplicationMonitor does not collect statistics on session level.

    It also creates and registers MXBeans that can be used to access these collected statistics. The created MXBeans will allow accessing monitored properties and statistics on application and endpoint level.

    For monitoring in Grizzly server an instance should be passed to the server in server properties.

         serverProperties.put(ApplicationEventListener.APPLICATION_EVENT_LISTENER, new SessionlessApplicationMonitor());
     
    For use in servlet container the class name should be passed as a context parameter in web.xml.
    
         <context-param>
             <param-name>org.glassfish.tyrus.core.monitoring.ApplicationEventListener</param-name>
             <param-value>org.glassfish.tyrus.ext.monitoring.jmx.SessionlessApplicationMonitor</param-value>
         </context-param>
    Author:
    Petr Janouch
    See Also:
    ApplicationEventListener
    • Constructor Detail

      • SessionlessApplicationMonitor

        public SessionlessApplicationMonitor()
        Constructor.
    • Method Detail

      • onTextMessageSent

        public void onTextMessageSent​(long length)
      • onBinaryMessageSent

        public void onBinaryMessageSent​(long length)
      • onControlMessageSent

        public void onControlMessageSent​(long length)
      • onTextMessageReceived

        public void onTextMessageReceived​(long length)
      • onBinaryMessageReceived

        public void onBinaryMessageReceived​(long length)
      • onControlMessageReceived

        public void onControlMessageReceived​(long length)