Class RadiusServerEventRegistrar

    • Constructor Summary

      Constructors 
      Constructor Description
      RadiusServerEventRegistrar​(com.google.common.eventbus.EventBus eventBus)
      Constructor.
    • Constructor Detail

      • RadiusServerEventRegistrar

        @Inject
        public RadiusServerEventRegistrar​(@Named("RadiusEventBus")
                                          com.google.common.eventbus.EventBus eventBus)
        Constructor. Registers this class with the radius events bus, such that it will be a subscriber to radius events. So that the radius packet and request statistics can be reported to JMX clients such as visualvm this class registers itself with the platforms MBean server. If this bean is already registered with the server, then it will be unregistered and then re-registered.
        Parameters:
        eventBus - - the event bus that this class will register as a subscriber with.
    • Method Detail

      • packetReceived

        public void packetReceived​(PacketReceivedEvent receivedEvent)
        Once an object of this class has registered with the eventBus (passed into the constructor) the EventBus will call this method when any PacketReceivedEvent objects are posted.
        Parameters:
        receivedEvent - - the event that was posted to the EventBus
      • packetAccepted

        public void packetAccepted​(AuthRequestReceivedEvent receivedRadiusEvent)
        Once an object of this class has registered with the eventBus (passed into the constructor) the EventBus will call this method when any AuthRequestReceivedEvent objects are posted.
        Parameters:
        receivedRadiusEvent - - the event that was posted to the EventBus
      • packetAccepted

        public long packetAccepted()
        Description copied from interface: RadiusServerEventRegistrator
        Notify the Event Registrar that a packet has been understood and hence 'accepted'.
        Specified by:
        packetAccepted in interface RadiusServerEventRegistrator
        Returns:
        the total number of packets accepted (including the one being reported).
      • getNumberOfAcceptedPackets

        public long getNumberOfAcceptedPackets()
        Description copied from interface: RadiusServerEventMonitorMXBean
        get the number of packets accepted by the radius server. These are packets that were understood and hence not thrown away or ignored by the RADIUS server.
        Specified by:
        getNumberOfAcceptedPackets in interface RadiusServerEventMonitorMXBean
        Returns:
        a long indicating the no. of packets understood and accepted.
      • packetProcessed

        public void packetProcessed​(PacketProcessedEvent packetProcessedEvent)
        Once an object of this class has registered with the eventBus (passed into the constructor) the EventBus will call this method when any PacketProcessedEvent objects are posted.
        Parameters:
        packetProcessedEvent - - the event that was posted to the EventBus
      • packetProcessed

        public long packetProcessed()
        Description copied from interface: RadiusServerEventRegistrator
        Notify the event Registrar that a packet has been processed. The authentication may have succeeded, or failed, but it has been processed to completion.
        Specified by:
        packetProcessed in interface RadiusServerEventRegistrator
        Returns:
        the total number of packets that have been processed.
      • getNumberOfPacketsProcessed

        public long getNumberOfPacketsProcessed()
        Description copied from interface: RadiusServerEventMonitorMXBean
        get the number of packets processed by the radius server (since started). These packets may have led to auth or been denied auth, but they were processed to completion, and hence not dropped, or failed in some way.
        Specified by:
        getNumberOfPacketsProcessed in interface RadiusServerEventMonitorMXBean
        Returns:
        a long indicating the number of packets processed.
      • authRequestAccepted

        public void authRequestAccepted​(AuthRequestAcceptedEvent acceptedEvent)
        Once an object of this class has registered with the eventBus (passed into the constructor) the EventBus will call this method when any AuthRequestAcceptedEvent objects are posted.
        Parameters:
        acceptedEvent - - the event that was posted to the EventBus
      • authRequestAccepted

        public long authRequestAccepted()
        Description copied from interface: RadiusServerEventRegistrator
        Notify the event Registrar that an auth request has been accepted. That is an AccessAccept packet has been sent to the client in response to the AccessRequest.
        Specified by:
        authRequestAccepted in interface RadiusServerEventRegistrator
        Returns:
        the total number of authentication requests that have been accepted.
      • getNumberOfAuthRequestsAccepted

        public long getNumberOfAuthRequestsAccepted()
        Description copied from interface: RadiusServerEventMonitorMXBean
        get the number of auth requests (AccessRequest packets) that resulted in AccessAccept packets being returned in response to the request.
        Specified by:
        getNumberOfAuthRequestsAccepted in interface RadiusServerEventMonitorMXBean
        Returns:
        a long indicating the number of requests that resulted in acceptance.
      • authRequestRejected

        public void authRequestRejected​(AuthRequestRejectedEvent authRequestRejectedEvent)
        Once an object of this class has registered with the eventBus (passed into the constructor) the EventBus will call this method when any AuthRequestRejectedEvent objects are posted.
        Parameters:
        authRequestRejectedEvent - - the event that was posted to the EventBus
      • authRequestRejected

        public long authRequestRejected()
        Description copied from interface: RadiusServerEventRegistrator
        Notify the event Registrar that an auth request has been rejected. That is, an AccessReject packet has been sent to the client in response to the AccessRequest.
        Specified by:
        authRequestRejected in interface RadiusServerEventRegistrator
        Returns:
        the total number of authentication requests that have been rejected.
      • getNumberOfAuthRequestsRejected

        public long getNumberOfAuthRequestsRejected()
        Description copied from interface: RadiusServerEventMonitorMXBean
        get the number of auth requests (AccessRequest packets) that resulted in AccessReject packets being returned in response to the request.
        Specified by:
        getNumberOfAuthRequestsRejected in interface RadiusServerEventMonitorMXBean
        Returns:
        a long indicating the number of requests that resulted in rejection.