java.lang.Object
net.i2p.i2ptunnel.access.FilterDefinitionElement
net.i2p.i2ptunnel.access.ExplicitFilterDefinitionElement
Filter definition element for a single explicitly defined remote destination.
Defines access control for a specific remote destination using a .b32 address, applying the given threshold to limit connection behavior from that destination.
Field Summary
FieldsFields inherited from class FilterDefinitionElement
thresholdConstructor Summary
ConstructorsConstructorDescriptionExplicitFilterDefinitionElement(String b32, Threshold threshold) Create an element for the single destination named by the address, and decode it to the hash used as the tracker's key.Method Summary
All MethodsModifier and TypeMethodDescriptionvoidupdate(Map<Hash, DestTracker> map) Updates the provided map with the hash(es) of remote destinations mentioned in this element.Methods inherited from class FilterDefinitionElement
fromBase32, getThresholdModifier and TypeMethodDescriptionprotected static HashfromBase32(String b32) Utility method to create a Hash object from a .b32 string.(package private) ThresholdThe access limit applied to the destinations this element names.
Field Details
hash
The destination this rule matches, decoded from its address.
Constructor Details
ExplicitFilterDefinitionElement
ExplicitFilterDefinitionElement(String b32, Threshold threshold) throws InvalidDefinitionException Create an element for the single destination named by the address, and decode it to the hash used as the tracker's key.- Parameters:
b32- A string with the .b32 representation of the remote destinationthreshold- threshold to apply to that destination- Throws:
InvalidDefinitionException- if the b32 string is not valid b32
Method Details
update
Description copied from class:FilterDefinitionElementUpdates the provided map with the hash(es) of remote destinations mentioned in this element.- Specified by:
updatein classFilterDefinitionElement- Parameters:
map- the destination-to-tracker map the discovered hashes are added to