org.jumpmind.symmetric.security.inet
Class Inet4AddressAuthorizerCompiler
java.lang.Object
org.jumpmind.symmetric.security.inet.AbstractInetAddressAuthorizerCompiler
org.jumpmind.symmetric.security.inet.Inet4AddressAuthorizerCompiler
- All Implemented Interfaces:
- IInetAddressAuthorizerCompiler
public class Inet4AddressAuthorizerCompiler
- extends AbstractInetAddressAuthorizerCompiler
Filter compiler for IPv4 addresses.
- Author:
- dmichels2
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IPv4_OCTET_SEPARATOR
public static final java.lang.String IPv4_OCTET_SEPARATOR
- See Also:
- Constant Field Values
BROADCAST_OCTET
public static final java.lang.String BROADCAST_OCTET
- See Also:
- Constant Field Values
NUM_IPv4_OCTETS
public static final int NUM_IPv4_OCTETS
- See Also:
- Constant Field Values
SHORT_MASK
public static final short SHORT_MASK
- See Also:
- Constant Field Values
ANY
public static final byte ANY
- See Also:
- Constant Field Values
Inet4AddressAuthorizerCompiler
public Inet4AddressAuthorizerCompiler()
compileForIpVersion
protected IRawInetAddressAuthorizer compileForIpVersion(java.lang.String filter)
throws java.net.UnknownHostException
- Compiles for IPv4 specific address filter strings.
- Specified by:
compileForIpVersion in class AbstractInetAddressAuthorizerCompiler
- Parameters:
filter -
- Returns:
-
- Throws:
java.net.UnknownHostException
getAddressSeparator
protected java.lang.String getAddressSeparator()
- Specified by:
getAddressSeparator in class AbstractInetAddressAuthorizerCompiler
- Returns:
getBroadcastString
protected java.lang.String getBroadcastString()
- Specified by:
getBroadcastString in class AbstractInetAddressAuthorizerCompiler
- Returns:
getOctetFromString
protected short getOctetFromString(java.lang.String octect)
- Mechanism to pull a
short from the provided textual octet. Use short values as we
have to do comparisons and bytes are signed (and we'd have to add 254 prior to comparison, blah,
blah, blah)
- Parameters:
octect -
- Returns:
convertAddressBytesToShort
public static short[] convertAddressBytesToShort(byte[] bytes)
- Utility method to convert between the actual
byte[] address representation and a
short[] used to perform the address and range comparison.
- Parameters:
bytes -
- Returns:
convertShortToAddressBytes
public static byte[] convertShortToAddressBytes(short[] shorts)
- Utility method to convert between the
short[] used for comparison and a byte[] for
actual address representation.
- Parameters:
shorts -
- Returns:
Copyright © 2007-2008. All Rights Reserved.