public abstract class AbstractNetworkMatcher
extends org.apache.mailet.base.GenericMatcher
AbstractNetworkMatcher makes writing IP Address matchers easier.
This class extends the GenericMatcher, and as such, has access to the matcher
condition via GenericMatcher.getCondition().
On initialization, the init method retrieves the condition from the defined
matcher and create a corresponding NetMatcher.
The marcher condition has to respect the syntax waited by the NetMacher.
This abstract network matcher needs to be implemented by a concrete class.
The implementing concrete class will call the allowedNetworks or matchNetwork
methods.
NetMatcher
Constructor and Description |
---|
AbstractNetworkMatcher() |
Modifier and Type | Method and Description |
---|---|
protected Collection<String> |
allowedNetworks() |
void |
init() |
protected boolean |
matchNetwork(InetAddress addr) |
protected boolean |
matchNetwork(String addr) |
void |
setDNSService(DNSService dnsService)
Injection setter for the DNSService.
|
public void init() throws javax.mail.MessagingException
init
in class org.apache.mailet.base.GenericMatcher
javax.mail.MessagingException
protected Collection<String> allowedNetworks()
protected boolean matchNetwork(InetAddress addr)
protected boolean matchNetwork(String addr)
public void setDNSService(DNSService dnsService)
dnsService
- Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.