View Javadoc

1   /*
2    * SymmetricDS is an open source database synchronization solution.
3    *   
4    * Copyright (C) Dave Michels <dmichels2@users.sourceforge.net>,
5    *
6    * This library is free software; you can redistribute it and/or
7    * modify it under the terms of the GNU Lesser General Public
8    * License as published by the Free Software Foundation; either
9    * version 3 of the License, or (at your option) any later version.
10   *
11   * This library is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14   * Lesser General Public License for more details.
15   *
16   * You should have received a copy of the GNU Lesser General Public
17   * License along with this library; if not, see
18   * <http://www.gnu.org/licenses/>.
19   */
20  
21  package org.jumpmind.symmetric.security.inet;
22  
23  import java.net.UnknownHostException;
24  
25  /***
26   * <b>Unimplemented</b>. Need to add IPv6 support
27   * 
28   * @author dmichels
29   */
30  public class Inet6AddressAuthorizerCompiler extends AbstractInetAddressAuthorizerCompiler
31  {
32      /***
33       * Constant that defines the separator for the pieces of an IPv6 address. These are ':' and '.' (where '.' is in the
34       * case of an IPv4 compatible IPv6 address)
35       */
36      public static final String IPv6_SEPARATOR = ":.";
37  
38      public static final String BROADCAST_PIECE = "FFFF";
39  
40      public static final int NUM_IPv6_PIECES = 8;
41  
42      /***
43       * <b>This method currently throws an <code>UnsupportedOperationException</code> as IPv6 has not yet been impl'd</b>
44       * 
45       * @param filter
46       */
47      @Override
48      public IRawInetAddressAuthorizer compileForIpVersion(final String filter) throws UnknownHostException
49      {
50          // TODO this needs to be gutted for IPv6 support
51          throw new UnsupportedOperationException("IPv6 filters are currently not supported");
52      }
53  
54      @Override
55      protected String getAddressSeparator()
56      {
57          return IPv6_SEPARATOR;
58      }
59  
60      @Override
61      protected String getBroadcastString()
62      {
63          return BROADCAST_PIECE;
64      }
65  
66  }