net.sf.jradius.server
Class JRadiusRequest
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap
org.apache.commons.chain.impl.ContextBase
net.sf.jradius.server.JRadiusEvent
net.sf.jradius.server.JRadiusRequest
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map, org.apache.commons.chain.Context
- Direct Known Subclasses:
- FreeRadiusRequest
public abstract class JRadiusRequest
- extends JRadiusEvent
An abstract class representing a JRadius Server Request.
- Author:
- David Bird, Gert Jan Verhoog
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
Methods inherited from class org.apache.commons.chain.impl.ContextBase |
clear, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, values |
Methods inherited from class java.util.HashMap |
clone, containsKey, size |
Methods inherited from class java.util.AbstractMap |
equals, hashCode |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
containsKey, equals, hashCode, size |
JRadiusRequest
public JRadiusRequest()
getReturnValue
public abstract int getReturnValue()
- Returns:
- Returns the return value of the JRadiusRequest
setReturnValue
public abstract void setReturnValue(int returnValue)
- Parameters:
returnValue
- The new return value to set
getConfigItems
public abstract AttributeList getConfigItems()
- Returns:
- Returns the RADIUS Server "Configuration Items" as AttributeList
getPackets
public abstract RadiusPacket[] getPackets()
- Returns:
- Returns an array of the RadiusPackets received
setConfigItems
public abstract void setConfigItems(AttributeList configItems)
- Parameters:
configItems
- The new "Configuration Items" to set in the RADIUS Server
setPackets
public abstract void setPackets(RadiusPacket[] packets)
- Parameters:
packets
- The RadiusPacket array to return to the RADIUS Server
getSession
public JRadiusSession getSession()
- Get the RadiusSession assinged to this JRadiusRequest
- Returns:
- Returns the session.
setSession
public void setSession(JRadiusSession session)
- Assign a RadiusSession to a JRadiusRequest
- Parameters:
session
- The session to set.
getSessionKey
public java.lang.String getSessionKey()
- Returns:
- Returns the sessionKey, if one exists
getRequestPacket
public RadiusPacket getRequestPacket()
throws RadiusException
- Convenience method, returns the Request RadiusPacket of a
JRadiusRequest. This is the first packet in the packet array.
- Returns:
- a RadiusPacket containing the radius request
- Throws:
RadiusException
getReplyPacket
public RadiusPacket getReplyPacket()
throws RadiusException
- Convenience method, returns the Reply RadiusPacket of a
JRadiusRequest. This is the second packet in the packet array.
Use hasReplyPacket() to ensure there is a reply packet in the JRadiusRequest.
- Returns:
- RadiusPacket containing the radius reply
- Throws:
RadiusException
hasReplyPacket
public boolean hasReplyPacket()
- Returns:
- True if the JRadiusRequest has a reply packet
isAccountingRequest
public boolean isAccountingRequest()
- Returns:
- Returns true if the request is an Accounting-Request
addReplyAttribute
public void addReplyAttribute(RadiusAttribute a)
- Add an attribute to the reply by adding to the reply packet, if one,
or the configItems.
- Parameters:
a
- The RadiusAttribute
printDebugInfo
public void printDebugInfo(java.io.PrintStream out)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.util.AbstractMap
Copyright © 2006 The JRadius Project, All Rights Reserved.