Class RadiusServerEventRegistrar
- java.lang.Object
-
- org.forgerock.openam.radius.server.monitoring.RadiusServerEventRegistrar
-
- All Implemented Interfaces:
RadiusServerEventMonitorMXBean,RadiusServerEventRegistrator
public class RadiusServerEventRegistrar extends Object implements RadiusServerEventRegistrator, RadiusServerEventMonitorMXBean
Collates information for JMX reporting and monitoring.
-
-
Constructor Summary
Constructors Constructor Description RadiusServerEventRegistrar(com.google.common.eventbus.EventBus eventBus)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longauthRequestAccepted()Notify the event Registrar that an auth request has been accepted.voidauthRequestAccepted(AuthRequestAcceptedEvent acceptedEvent)Once an object of this class has registered with the eventBus (passed into the constructor) theEventBuswill call this method when anyAuthRequestAcceptedEventobjects are posted.longauthRequestRejected()Notify the event Registrar that an auth request has been rejected.voidauthRequestRejected(AuthRequestRejectedEvent authRequestRejectedEvent)Once an object of this class has registered with the eventBus (passed into the constructor) theEventBuswill call this method when anyAuthRequestRejectedEventobjects are posted.longgetNumberOfAcceptedPackets()get the number of packets accepted by the radius server.longgetNumberOfAuthRequestsAccepted()get the number of auth requests (AccessRequest packets) that resulted in AccessAccept packets being returned in response to the request.longgetNumberOfAuthRequestsRejected()get the number of auth requests (AccessRequest packets) that resulted in AccessReject packets being returned in response to the request.longgetNumberOfPacketsProcessed()get the number of packets processed by the radius server (since started).longgetNumberOfPacketsRecieved()Get alongcount of all of the RADIUS packets received on the UDP channel.longpacketAccepted()Notify the Event Registrar that a packet has been understood and hence 'accepted'.voidpacketAccepted(AuthRequestReceivedEvent receivedRadiusEvent)Once an object of this class has registered with the eventBus (passed into the constructor) theEventBuswill call this method when anyAuthRequestReceivedEventobjects are posted.longpacketProcessed()Notify the event Registrar that a packet has been processed.voidpacketProcessed(PacketProcessedEvent packetProcessedEvent)Once an object of this class has registered with the eventBus (passed into the constructor) theEventBuswill call this method when anyPacketProcessedEventobjects are posted.longpacketReceived()Report to the Event Registrar that a packet has been received.voidpacketReceived(PacketReceivedEvent receivedEvent)Once an object of this class has registered with the eventBus (passed into the constructor) theEventBuswill call this method when anyPacketReceivedEventobjects are posted.
-
-
-
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) theEventBuswill call this method when anyPacketReceivedEventobjects are posted.- Parameters:
receivedEvent- - the event that was posted to theEventBus
-
packetReceived
public long packetReceived()
Description copied from interface:RadiusServerEventRegistratorReport to the Event Registrar that a packet has been received.- Specified by:
packetReceivedin interfaceRadiusServerEventRegistrator- Returns:
- the total number of packets received (including the one being reported).
-
getNumberOfPacketsRecieved
public long getNumberOfPacketsRecieved()
Description copied from interface:RadiusServerEventMonitorMXBeanGet alongcount of all of the RADIUS packets received on the UDP channel.- Specified by:
getNumberOfPacketsRecievedin interfaceRadiusServerEventMonitorMXBean- Returns:
- a
longcount of all of the RADIUS packets received on the UDP channel.
-
packetAccepted
public void packetAccepted(AuthRequestReceivedEvent receivedRadiusEvent)
Once an object of this class has registered with the eventBus (passed into the constructor) theEventBuswill call this method when anyAuthRequestReceivedEventobjects are posted.- Parameters:
receivedRadiusEvent- - the event that was posted to theEventBus
-
packetAccepted
public long packetAccepted()
Description copied from interface:RadiusServerEventRegistratorNotify the Event Registrar that a packet has been understood and hence 'accepted'.- Specified by:
packetAcceptedin interfaceRadiusServerEventRegistrator- Returns:
- the total number of packets accepted (including the one being reported).
-
getNumberOfAcceptedPackets
public long getNumberOfAcceptedPackets()
Description copied from interface:RadiusServerEventMonitorMXBeanget 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:
getNumberOfAcceptedPacketsin interfaceRadiusServerEventMonitorMXBean- Returns:
- a
longindicating 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) theEventBuswill call this method when anyPacketProcessedEventobjects are posted.- Parameters:
packetProcessedEvent- - the event that was posted to theEventBus
-
packetProcessed
public long packetProcessed()
Description copied from interface:RadiusServerEventRegistratorNotify 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:
packetProcessedin interfaceRadiusServerEventRegistrator- Returns:
- the total number of packets that have been processed.
-
getNumberOfPacketsProcessed
public long getNumberOfPacketsProcessed()
Description copied from interface:RadiusServerEventMonitorMXBeanget 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:
getNumberOfPacketsProcessedin interfaceRadiusServerEventMonitorMXBean- Returns:
- a
longindicating 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) theEventBuswill call this method when anyAuthRequestAcceptedEventobjects are posted.- Parameters:
acceptedEvent- - the event that was posted to theEventBus
-
authRequestAccepted
public long authRequestAccepted()
Description copied from interface:RadiusServerEventRegistratorNotify 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:
authRequestAcceptedin interfaceRadiusServerEventRegistrator- Returns:
- the total number of authentication requests that have been accepted.
-
getNumberOfAuthRequestsAccepted
public long getNumberOfAuthRequestsAccepted()
Description copied from interface:RadiusServerEventMonitorMXBeanget the number of auth requests (AccessRequest packets) that resulted in AccessAccept packets being returned in response to the request.- Specified by:
getNumberOfAuthRequestsAcceptedin interfaceRadiusServerEventMonitorMXBean- Returns:
- a
longindicating 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) theEventBuswill call this method when anyAuthRequestRejectedEventobjects are posted.- Parameters:
authRequestRejectedEvent- - the event that was posted to theEventBus
-
authRequestRejected
public long authRequestRejected()
Description copied from interface:RadiusServerEventRegistratorNotify 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:
authRequestRejectedin interfaceRadiusServerEventRegistrator- Returns:
- the total number of authentication requests that have been rejected.
-
getNumberOfAuthRequestsRejected
public long getNumberOfAuthRequestsRejected()
Description copied from interface:RadiusServerEventMonitorMXBeanget the number of auth requests (AccessRequest packets) that resulted in AccessReject packets being returned in response to the request.- Specified by:
getNumberOfAuthRequestsRejectedin interfaceRadiusServerEventMonitorMXBean- Returns:
- a
longindicating the number of requests that resulted in rejection.
-
-