Package weblogic.security.net

Examples of weblogic.security.net.ConnectionFilter


   */
  public static void main(String[] args)
    throws Exception
  {
    System.out.println("Enter rules on separate lines:");
    ConnectionFilter cf = new SimpleConnectionFilter(System.in);

    LineNumberReader r =
      new LineNumberReader(new InputStreamReader(System.in));

    String line;
   
    System.out.println("Enter addresses on separate lines:");

    while ((line = r.readLine()) != null)
    {
      try
      {
  StringTokenizer toks = new StringTokenizer(line.trim());
  String addr = toks.nextToken();
  String proto = toks.nextToken();
  InetAddress[] addrs = InetAddress.getAllByName(addr);

  for (int i = 0; i < addrs.length; i++)
  {
    try
    {
      cf.accept(new ConnectionEvent(addrs[i], 0, 0, proto));
      System.out.println("ALLOW");
    }
    catch (FilterException e)
    {
      System.out.println("DENY: " + e.getMessage());
View Full Code Here

TOP

Related Classes of weblogic.security.net.ConnectionFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.