org.apache.james.transport.matchers
Class AbstractNetworkMatcher

java.lang.Object
  extended by org.apache.mailet.base.GenericMatcher
      extended by org.apache.james.transport.matchers.AbstractNetworkMatcher
All Implemented Interfaces:
org.apache.mailet.Matcher, org.apache.mailet.MatcherConfig
Direct Known Subclasses:
RemoteAddrInNetwork, RemoteAddrNotInNetwork, SenderInFakeDomain

public abstract class AbstractNetworkMatcher
extends org.apache.mailet.base.GenericMatcher

AbstractNetworkMatcher makes writing IP Address matchers easier. AbstractNetworkMatcher provides a means for checking to see whether a particular IP address or domain is within a set of subnets These subnets may be expressed in one of several formats: Format Example explicit address 127.0.0.1 address with a wildcard 127.0.0.* domain name myHost.com domain name + prefix-length myHost.com/24 domain name + mask myHost.com/255.255.255.0 IP address + prefix-length 127.0.0.0/8 IP + mask 127.0.0.0/255.0.0.0 For more information, see also: RFC 1518 and RFC 1519.

Version:
$ID$

Constructor Summary
AbstractNetworkMatcher()
           
 
Method Summary
protected  java.util.Collection allowedNetworks()
           
 void init()
           
protected  boolean matchNetwork(java.net.InetAddress addr)
           
protected  boolean matchNetwork(java.lang.String addr)
           
 
Methods inherited from class org.apache.mailet.base.GenericMatcher
destroy, getCondition, getMailetContext, getMatcherConfig, getMatcherInfo, getMatcherName, init, log, log, match
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractNetworkMatcher

public AbstractNetworkMatcher()
Method Detail

init

public void init()
          throws javax.mail.MessagingException
Overrides:
init in class org.apache.mailet.base.GenericMatcher
Throws:
javax.mail.MessagingException

allowedNetworks

protected java.util.Collection allowedNetworks()

matchNetwork

protected boolean matchNetwork(java.net.InetAddress addr)

matchNetwork

protected boolean matchNetwork(java.lang.String addr)


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.