Package org.tinyradius.packet
Class RadiusPackets
- java.lang.Object
-
- org.tinyradius.packet.RadiusPackets
-
public class RadiusPackets extends java.lang.Object
Utils for creating new RadiusPackets
-
-
Constructor Summary
Constructors Constructor Description RadiusPackets()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RadiusPacket
createRadiusPacket(Dictionary dictionary, int type, int identifier, byte[] authenticator, java.util.List<RadiusAttribute> attributes)
Creates a RadiusPacket object.static int
nextPacketId()
Increment and return the next packet identifier, between 0 and 255
-
-
-
Method Detail
-
nextPacketId
public static int nextPacketId()
Increment and return the next packet identifier, between 0 and 255- Returns:
- the next packet identifier to use
-
createRadiusPacket
public static RadiusPacket createRadiusPacket(Dictionary dictionary, int type, int 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
-
-