AXL RADIUS Server API V3

com.theorem.radserver3
Class ProxyInfo

Object
  extended byPacketInfo
      extended byProxyInfo

public final class ProxyInfo
extends PacketInfo

Class to pass information to a ProxyImpl method.

See Also:
ProxyClient for sending a packet to multiple servers.

Field Summary
 
Fields inherited from class PacketInfo
AUTH_LENGTH, AUTH_STATE_OBJECT
 
Method Summary
 NAS[] getNASList()
          Return a list of the client NAS's.
 NAS[] getProxyNASList()
          Return a list of the Proxy server NAS's.
 Object getProxyStateObject()
          Get the external object associated with the Proxy-State.
 String[] getProxyTargetList()
          Return a list of the proxy realms.
 String getRespondingServerName()
          Get the name of the responding server.
 long getRoundTripTiming()
          Get the time in milliseconds for the proxy response.
 String getRoundTripTimingString()
          Get the time as a string.
 void sendClientResponse(int packetType, AttributeList responseList)
          Send a response back from the ProxyImpl.changeRequest(); Sometimes it's necessary for a proxy server to respond to a client directly rather than proxy a paricular packet.
 void setProxyStateObject(Object o)
          Set the external object associated with the Proxy-State.
 void setRoundTripTiming(boolean enable)
          Enable round trip proxy timing.
 void setTransparentProxy(String realmName)
          Set proxying transparently by overriding the proxy realm in the User-Name attribute.
 
Methods inherited from class PacketInfo
addProxyTarget, appendResponseAttributes, cmp, decode, encode, fromAccountingPort, fromAuthenticationPort, getAuthenticator, getDatagram, getDecodedUserPassword, getHostRealm, getMaximumPacketSize, getMessageID, getModule, getName, getNAS, getPacketID, getPacketTypeName, getPrefix, getProxyClient, getProxyStateAttributesLength, getProxyTargetByRealm, getProxyTargets, getRADIUSServer, getRealm, getRealmInfo, getRealmList, getRequestAttributeList, getRequestAttributes, getRequestType, getRequestTypeName, getResponseAttributeList, getResponseType, getResponseTypeName, getSecret, getServerName, getSourceAddress, getSourcePort, getStateObject, getUserName, getUserPassword, removeProxyTarget, sendV2Trap, setResponseAttributes, setResponseAttributes, setResponseType, setStateObject, translateProxyId, trim
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNASList

public NAS[] getNASList()
Return a list of the client NAS's. This is generally of use when handling Disconnect-Requests and CoA-Requests.

Returns:
Array of client NAS's.

getProxyNASList

public NAS[] getProxyNASList()
Return a list of the Proxy server NAS's. This is generally of use when handling Disconnect-Requests and CoA-Requests.

Returns:
Array of client NAS's.

getProxyStateObject

public Object getProxyStateObject()
Get the external object associated with the Proxy-State.

This is useful when some information must be associated with a proxy response packet. The ProxyImpl.changeRequest(ProxyInfo pi) may set some object to be retrieved when the response packet is returned and ProxyImpl.changeResponse() requires continuity with the request.

Returns:
Object or null if there's no object.
Since:
3.21g

getProxyTargetList

public String[] getProxyTargetList()
Return a list of the proxy realms.

Returns:
String array of proxy target names.

getRespondingServerName

public String getRespondingServerName()
Get the name of the responding server. This is used in response handling to determine the source of the packet.

Returns:
null if no proxy-state is available.
Since:
2.26

getRoundTripTiming

public long getRoundTripTiming()
Get the time in milliseconds for the proxy response.

For an example see ProxyFreeUsage.java.

Returns:
time in milliseconds if timings have been enabled. If timings have not been enabled zero will be returned, or this is called during a ProxyImpl.changeRequest().
Since:
3.26
See Also:
setRoundTripTiming(boolean enable)

getRoundTripTimingString

public String getRoundTripTimingString()
Get the time as a string. This will be in the shortest form of DD HH:MM:SS.sss. The shortest form of the string would be the minimum to display the time.

For an example see ProxyFreeUsage.java.

Returns:
The time string or an empty string if round trip timings are disabled or this is called during a ProxyImpl.changeRequest().
Since:
3.26
See Also:
setRoundTripTiming(boolean enable)

sendClientResponse

public void sendClientResponse(int packetType,
                               AttributeList responseList)
                        throws RADIUSServerException
Send a response back from the ProxyImpl.changeRequest();

Sometimes it's necessary for a proxy server to respond to a client directly rather than proxy a paricular packet.

For an example see ProxyFreeUsage.java.

Parameters:
packetType - The type of packet for the response, typically Access-Reject, Access-Accept, or Accounting-Response. The packet type must be a response type.
responseList - Response attribute list.
Throws:
RADIUSServerException - if there's a problem communicating with the client.

setProxyStateObject

public void setProxyStateObject(Object o)
Set the external object associated with the Proxy-State.

This is useful when some information must be associated with a forwarded packet. The ProxyImpl.changeRequest(ProxyInfo pi) may set some object to be retrieved when the response packet is returned and ProxyImpl.changeResponse() requires continuity with the request.

Parameters:
o - Object to preserve over a proxy.
Since:
3.21g

setRoundTripTiming

public void setRoundTripTiming(boolean enable)
Enable round trip proxy timing.

This enables the measuring of the time it takes a proxy request to make the round trip between this server and the final authenticating / accounting server. It can be used, for example, to throttle the RADIUS server's maximum packets up or down to keep from overloading the final server.

This affects all forwarded packets until disabled.

For an example see ProxyThrottle.java.

Parameters:
enable - True if round trip proxy timings are to be enabled.
Since:
3.26
See Also:
getRoundTripTiming(), getRoundTripTimingString()

setTransparentProxy

public void setTransparentProxy(String realmName)
Set proxying transparently by overriding the proxy realm in the User-Name attribute.

This RADIUS server will ignore any attribute information redirecting this packet to another RADIUS server. The realm name given as the argument will be used to redirect the packet. If the realm is the local host's realm name the packet will be handled locally.

Parameters:
realmName - Name of the server designated to handle this packet. This must be the proxy server's name and cannot be a synonym. It also may not be set to null or an empty string.

AXL RADIUS Server API V3

Submit a bug report or feature request

Copyright 1998-2008 AXL Software. PO Box 97, Viola, Delaware 19979, U.S.A. All Rights Reserved.