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 classRadiusClient.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 voidbeforeReceive(java.nio.ByteBuffer bb)RadiusPacketcreateAccountingRequest()RadiusPacketcreateDisconnectRequest()RadiusPacketcreateModifyRequest()RadiusPacketcreateRequest(byte code)voiddestroy()protected voidfinalize()RadiusPacketrequest(RadiusPacket packet)RadiusPacketrequest(RadiusPacket packet, long timeout, java.util.concurrent.TimeUnit unit)booleansend(RadiusPacket packet)booleansend(RadiusPacket packet, long timeout, java.util.concurrent.TimeUnit unit)java.util.concurrent.Future<java.lang.Boolean>sendAsync(RadiusPacket packet)voidsetConnectionId(long connectionId)voidsetNas(Idable nas)voidsetReuseAddress(boolean reuseAddress)protected intwriteRequestLog(RadiusPacket packet, java.nio.ByteBuffer data, java.util.Date time)protected voidwriteResponseLog(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.InvalidKeyExceptionjava.net.SocketExceptionjava.security.NoSuchAlgorithmExceptionjava.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.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.InvalidKeyExceptionjava.net.SocketExceptionjava.security.NoSuchAlgorithmExceptionjava.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.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.InvalidKeyExceptionjava.net.SocketExceptionjava.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.InvalidKeyExceptionjava.net.SocketExceptionjava.security.NoSuchAlgorithmExceptionjava.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.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.InvalidKeyExceptionjava.net.SocketExceptionjava.security.NoSuchAlgorithmExceptionjava.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.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:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-