Class RadiusClient
java.lang.Object
ru.bitel.bgbilling.kernel.network.radius.RadiusClient
public class RadiusClient
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RadiusClient.ResponseFuture<V>
-
Constructor Summary
Constructors Constructor Description RadiusClient(int sourcePort, java.net.InetAddress host, int port, byte[] secret)
Deprecated.RadiusClient(int sourcePort, java.net.InetAddress host, int port, byte[] secret, Setup setup, ru.bitel.bgbilling.kernel.network.radius.datalog.hourly.RadiusHourlyDataLogger dataLogger, boolean logCoA, boolean logPoD)
Deprecated.RadiusClient(java.lang.String sourceHost, int sourcePort, java.net.InetAddress host, int port, byte[] secret)
RadiusClient(java.lang.String sourceHost, int sourcePort, java.net.InetAddress host, int port, byte[] secret, Setup setup, ru.bitel.bgbilling.kernel.network.radius.datalog.hourly.RadiusHourlyDataLogger dataLogger, boolean logCoA, boolean logPoD)
RadiusClient(java.net.InetAddress host, int port, byte[] secret)
RadiusClient(java.net.InetAddress host, int port, byte[] secret, Setup setup, ru.bitel.bgbilling.kernel.network.radius.datalog.hourly.RadiusHourlyDataLogger dataLogger, boolean logCoA, boolean logPoD)
-
Method Summary
Modifier and Type Method Description protected void
beforeReceive(java.nio.ByteBuffer bb)
RadiusPacket
createAccountingRequest()
RadiusPacket
createDisconnectRequest()
RadiusPacket
createModifyRequest()
RadiusPacket
createRequest(byte code)
void
destroy()
protected void
finalize()
RadiusPacket
request(RadiusPacket packet)
RadiusPacket
request(RadiusPacket packet, long timeout, java.util.concurrent.TimeUnit unit)
boolean
send(RadiusPacket packet)
boolean
send(RadiusPacket packet, long timeout, java.util.concurrent.TimeUnit unit)
java.util.concurrent.Future<java.lang.Boolean>
sendAsync(RadiusPacket packet)
void
setConnectionId(long connectionId)
void
setNas(Idable nas)
void
setReuseAddress(boolean reuseAddress)
protected int
writeRequestLog(RadiusPacket packet, java.nio.ByteBuffer data, java.util.Date time)
protected void
writeResponseLog(ru.bitel.bgbilling.kernel.container.managed.ServerContext context, RadiusPacket packet, java.nio.ByteBuffer data, java.util.Date time, int deviceId, int connectionLogEntryId)
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
RadiusClient
public RadiusClient(java.net.InetAddress host, int port, byte[] secret) -
RadiusClient
@Deprecated public RadiusClient(int sourcePort, java.net.InetAddress host, int port, byte[] secret)Deprecated. -
RadiusClient
public RadiusClient(java.lang.String sourceHost, int sourcePort, java.net.InetAddress host, int port, byte[] secret) -
RadiusClient
public RadiusClient(java.net.InetAddress host, int port, byte[] secret, Setup setup, ru.bitel.bgbilling.kernel.network.radius.datalog.hourly.RadiusHourlyDataLogger dataLogger, boolean logCoA, boolean logPoD) -
RadiusClient
@Deprecated public RadiusClient(int sourcePort, java.net.InetAddress host, int port, byte[] secret, Setup setup, ru.bitel.bgbilling.kernel.network.radius.datalog.hourly.RadiusHourlyDataLogger dataLogger, boolean logCoA, boolean logPoD)Deprecated. -
RadiusClient
public RadiusClient(java.lang.String sourceHost, int sourcePort, java.net.InetAddress host, int port, byte[] secret, Setup setup, ru.bitel.bgbilling.kernel.network.radius.datalog.hourly.RadiusHourlyDataLogger dataLogger, boolean logCoA, boolean logPoD)
-
-
Method Details
-
setReuseAddress
public void setReuseAddress(boolean reuseAddress) -
createRequest
-
createAccountingRequest
-
createModifyRequest
-
createDisconnectRequest
-
send
public boolean send(RadiusPacket packet) throws java.security.InvalidKeyException, java.net.SocketException, java.security.NoSuchAlgorithmException, java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException- Throws:
java.security.InvalidKeyException
java.net.SocketException
java.security.NoSuchAlgorithmException
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
-
send
public boolean send(RadiusPacket packet, long timeout, java.util.concurrent.TimeUnit unit) throws java.security.InvalidKeyException, java.net.SocketException, java.security.NoSuchAlgorithmException, java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException- Throws:
java.security.InvalidKeyException
java.net.SocketException
java.security.NoSuchAlgorithmException
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
-
sendAsync
public java.util.concurrent.Future<java.lang.Boolean> sendAsync(RadiusPacket packet) throws java.security.InvalidKeyException, java.net.SocketException, java.security.NoSuchAlgorithmException- Throws:
java.security.InvalidKeyException
java.net.SocketException
java.security.NoSuchAlgorithmException
-
request
public RadiusPacket request(RadiusPacket packet) throws java.security.InvalidKeyException, java.net.SocketException, java.security.NoSuchAlgorithmException, java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException- Throws:
java.security.InvalidKeyException
java.net.SocketException
java.security.NoSuchAlgorithmException
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
-
request
public RadiusPacket request(RadiusPacket packet, long timeout, java.util.concurrent.TimeUnit unit) throws java.security.InvalidKeyException, java.net.SocketException, java.security.NoSuchAlgorithmException, java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException- Throws:
java.security.InvalidKeyException
java.net.SocketException
java.security.NoSuchAlgorithmException
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
-
setNas
-
setConnectionId
public void setConnectionId(long connectionId) -
writeRequestLog
-
writeResponseLog
protected void writeResponseLog(ru.bitel.bgbilling.kernel.container.managed.ServerContext context, RadiusPacket packet, java.nio.ByteBuffer data, java.util.Date time, int deviceId, int connectionLogEntryId) -
beforeReceive
protected void beforeReceive(java.nio.ByteBuffer bb) -
destroy
public void destroy() -
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-