|
AXL Software® | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAttributes
ClientException
Class for notification of a a RADIUS packet transmission or reception failure. Generally this will be a timeout waiting for a RADIUS packet to return either because the server has detected a problem or less often one of the packets (request / response) packets has been lost or other exception.
Access to data handling methods in this class may only be performed when
isReady() returns true.
Other exceptions include SocketException, UnknownHostException, IOException, ClientSendException
or ClientReceiveException.
SocketExceptions and UnknownHostExceptions are usually caused by the RADIUSClient constructor
and RADIUSClient.reset(). The IOException is thrown by
RADIUSClient.debug() if the debug output file cannot be opened.
ClientReceiveException is thrown if the server doesn't respond before the time out period or
declines to respond at all.
ClientSendException is almost never thrown. The underlying network software would have to
disappear for a UDP transmission to fail.
This class will not override the LoginException which will be thrown in any case. It may give insight into what went wrong.
In the case of a ClientReceiveException calling the method resend(boolean) will resend the
packet. If a retry is not attempted a LoginException will be thrown.
Example of usage in a CallbackHandler
final int RETRIES = 3;
...
int retryCount = 0;
...
} else if (cb instanceof ClientException) {
ClientException ce = (ClientException)cb;
// Perform some number of retries.
// If no more retries are available a LoginException
// will be thrown by RADIUSLogin.
if (ce.isReady())
ce.resend(retryCount++ < RETRIES);
continue;
}
| Field Summary |
| Fields inherited from class Attributes |
Access_Accept, Access_BadPacket, Access_Challenge, Access_Reject |
| Method Summary | |
Exception |
getException()
Get the exception. |
void |
resend(boolean retry)
Indicate that the packet should be resent. |
| Methods inherited from class Attributes |
getRequestAttributes, getResponse, getResponseAttributes, isReady, setReady, setRequestAttributes, setResponse |
| Methods inherited from class Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public Exception getException()
public void resend(boolean retry)
retry - If true resend the packet, otherwise don't resent and accept the error as terminal.
|
AXL Software® | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||