|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jradius.client.RadiusClient
public class RadiusClient
A Radius Client Context
Field Summary | |
---|---|
protected static LinkedHashMap<String,Class<?>> |
authenticators
|
protected JRadiusSession |
session
|
protected RadiusClientTransport |
transport
|
Constructor Summary | |
---|---|
RadiusClient()
Default constructor |
|
RadiusClient(DatagramSocket socket)
|
|
RadiusClient(DatagramSocket socket,
InetAddress address,
String secret)
|
|
RadiusClient(DatagramSocket socket,
InetAddress address,
String secret,
int authPort,
int acctPort,
int timeout)
|
|
RadiusClient(InetAddress address,
String secret)
RadiusClient constructor |
|
RadiusClient(InetAddress address,
String secret,
int authPort,
int acctPort,
int timeout)
RadiusClient constructor |
|
RadiusClient(RadiusClientTransport transport)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected RadiusClientTransport transport
protected static final LinkedHashMap<String,Class<?>> authenticators
protected JRadiusSession session
Constructor Detail |
---|
public RadiusClient() throws IOException
IOException
public RadiusClient(DatagramSocket socket)
public RadiusClient(RadiusClientTransport transport)
public RadiusClient(InetAddress address, String secret) throws IOException
address
- The Internet address to send tosecret
- Our shared secret
IOException
RadiusException
public RadiusClient(DatagramSocket socket, InetAddress address, String secret)
public RadiusClient(InetAddress address, String secret, int authPort, int acctPort, int timeout) throws IOException
address
- The Internet address to send tosecret
- Our shared secretauthPort
- The authentication portacctPort
- The accounting porttimeout
- Timeout (time to wait for a reply)
IOException
RadiusException
public RadiusClient(DatagramSocket socket, InetAddress address, String secret, int authPort, int acctPort, int timeout) throws SocketException
SocketException
Method Detail |
---|
public void close()
public static void registerAuthenticator(String name, Class<?> c)
name
- The authentication protocol namec
- The RadiusAuthenticator class that implements the protocolpublic static void registerAuthenticator(String name, String className) throws ClassNotFoundException
ClassNotFoundException
public static RadiusAuthenticator getAuthProtocol(String protocolName)
Examples:
protocolName
- The requested authentication protocol
public RadiusResponse sendReceive(RadiusRequest p, int retries) throws RadiusException
RadiusException
public void send(RadiusRequest p) throws Exception
Exception
public RadiusResponse authenticate(AccessRequest p, RadiusAuthenticator auth, int retries) throws RadiusException, UnknownAttributeException
p
- RadiusPacket to be send (should be AccessRequest)auth
- The RadiusAuthenticator instance (if null, PAPAuthenticator is used)retries
- Number of times to retry (without response)
RadiusException
UnknownAttributeException
public AccountingResponse accounting(AccountingRequest p, int retries) throws RadiusException
p
- The RadiusPacket to be sent (should be AccountingRequest)retries
- Number of times to retry (without a response)
RadiusException
UnknownAttributeException
public DisconnectResponse disconnect(DisconnectRequest p, int retries) throws RadiusException
RadiusException
public CoAResponse changeOfAuth(CoARequest p, int retries) throws RadiusException
RadiusException
public int getAcctPort()
public void setAcctPort(int acctPort)
acctPort
- The RADIUS accounting portpublic int getAuthPort()
public void setAuthPort(int authPort)
authPort
- The RADIUS authentication portpublic int getSocketTimeout()
public void setSocketTimeout(int socketTimeout)
socketTimeout
- The socket timeout (in seconds)public InetAddress getRemoteInetAddress()
public void setRemoteInetAddress(InetAddress remoteInetAddress)
remoteInetAddress
- The remote server IP Addresspublic InetAddress getLocalInetAddress()
public void setLocalInetAddress(InetAddress localInetAddress)
localInetAddress
- The local IP Address to bind topublic String getSharedSecret()
public void setSharedSecret(String sharedSecret)
sharedSecret
- The shared secret to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |