Package org.tinyradius.packet.util
Class RadiusPackets
java.lang.Object
org.tinyradius.packet.util.RadiusPackets
public class RadiusPackets
extends java.lang.Object
Utils for creating new RadiusPackets
-
Method Summary
Modifier and Type Method Description static RadiusRequest
createRequest(Dictionary dictionary, byte type, byte identifier, byte[] authenticator, java.util.List<RadiusAttribute> attributes)
Creates a RadiusPacket object.static RadiusResponse
createResponse(Dictionary dictionary, byte type, byte identifier, byte[] authenticator, java.util.List<RadiusAttribute> attributes)
Creates a RadiusPacket object.
-
Method Details
-
createRequest
public static RadiusRequest createRequest(Dictionary dictionary, byte type, byte identifier, byte[] authenticator, java.util.List<RadiusAttribute> attributes)Creates a RadiusPacket object. Depending on the passed type, an appropriate packet is created. Also sets the type, and the the packet identifier.- Parameters:
dictionary
- custom dictionary to usetype
- packet typeidentifier
- packet identifierauthenticator
- authenticator for packet, nullableattributes
- list of attributes for packet- Returns:
- RadiusPacket object
-
createResponse
public static RadiusResponse createResponse(Dictionary dictionary, byte type, byte identifier, byte[] authenticator, java.util.List<RadiusAttribute> attributes)Creates a RadiusPacket object. Depending on the passed type, an appropriate packet is created. Also sets the type, and the the packet identifier.- Parameters:
dictionary
- custom dictionary to usetype
- packet typeidentifier
- packet identifierauthenticator
- authenticator for packet, nullableattributes
- list of attributes for packet- Returns:
- RadiusPacket object
-