Class RadiusRequestHandler

  • All Implemented Interfaces:
    Runnable

    public class RadiusRequestHandler
    extends Object
    implements Runnable
    Handles valid (ie: from approved clients) incoming radius access-request packets passing responsibility for generating a response to the client's declared handler class. The handler results are returned to the request thread via a promise. This allows a catastrophic failure in one off the handler threads to affect a shutdown of the listener thread and the executors. It also allows for retrying of requests that fail for temporary reasons (e.g. network connection issues) although this is not yet implemented.
    • Constructor Detail

      • RadiusRequestHandler

        public RadiusRequestHandler​(AccessRequestHandlerFactory accessRequestHandlerFactory,
                                    RadiusRequestContext reqCtx,
                                    ByteBuffer buffer,
                                    com.google.common.eventbus.EventBus eventBus)
        Constructs a request handler.
        Parameters:
        accessRequestHandlerFactory - - a factory object that will construct access request handlers used to handle the radius requests.
        reqCtx - a RadiusRequestContext object. Must be non-null.
        buffer - an ByteBuffer containing the bytes received by a radius handler.
        eventBus - used to notify interested parties of events occurring during the processing of radius requests.
    • Method Detail

      • getClientName

        public String getClientName()
        Returns the name of the client from which the packet was received.
        Returns:
        the name of the client from which the packet was received.
      • run

        public void run()
        Specified by:
        run in interface Runnable