Package org.tinyradius.client
Class RadiusClient
java.lang.Object
org.tinyradius.client.RadiusClient
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class RadiusClient
extends java.lang.Object
implements java.io.Closeable
A simple Radius client which binds to a specific socket, and can
then be used to send any number of packets to any endpoints through
that socket.
-
Constructor Summary
Constructors Constructor Description RadiusClient(io.netty.bootstrap.Bootstrap bootstrap, java.net.SocketAddress listenAddress, TimeoutHandler timeoutHandler, io.netty.channel.ChannelHandler handler)
-
Method Summary
Modifier and Type Method Description void
close()
io.netty.util.concurrent.Future<RadiusResponse>
communicate(RadiusRequest packet, RadiusEndpoint endpoint)
-
Constructor Details
-
RadiusClient
public RadiusClient(io.netty.bootstrap.Bootstrap bootstrap, java.net.SocketAddress listenAddress, TimeoutHandler timeoutHandler, io.netty.channel.ChannelHandler handler)- Parameters:
bootstrap
- bootstrap with channel class and eventLoopGroup set uplistenAddress
- local address to bind totimeoutHandler
- retry strategy for scheduling retries and timeoutshandler
- ChannelHandler to handle outbound requests
-
-
Method Details
-
communicate
public io.netty.util.concurrent.Future<RadiusResponse> communicate(RadiusRequest packet, RadiusEndpoint endpoint) -
close
public void close()- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-