BEA Systems, Inc.

weblogic.security.net
Class ConnectionFilterImpl

java.lang.Object
  extended by weblogic.security.net.ConnectionFilterImpl
All Implemented Interfaces:
EventListener, ConnectionFilter, ConnectionFilterRulesListener

public class ConnectionFilterImpl
extends Object
implements ConnectionFilter, ConnectionFilterRulesListener

Default connection filter implementation. This class accepts all incoming connections and also provides static factory methods that allow the server to obtain the current connection filter.


Constructor Summary
ConnectionFilterImpl()
          Public no-arg constructor.
 
Method Summary
 void accept(ConnectionEvent evt)
          Filters a client connection event.
 void checkRules(String[] filterList)
          Check the current rules.
protected  void checkRules(String[] filterList, Vector entries)
           
static boolean filterEnabled()
          Indicate whether the connection filter is enabled in this server.
static ConnectionFilter getFilter()
          Return the current server-wide connection filter in use, if any.
protected static boolean parseAction(String whatever)
           
protected static int[] parseAddresses(String str)
           
protected  void parseLine(String line, Vector entries)
           
protected static int parseNetmask(String maskStr)
           
protected static int parseProtocols(StringTokenizer toks)
           
protected static int parseSingleAddress(String str)
           
static void setFilter(ConnectionFilter filter)
          Deprecated.  
 void setRules(String[] filterList)
          Set and check the current rules.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionFilterImpl

public ConnectionFilterImpl()
Public no-arg constructor.

Method Detail

checkRules

public void checkRules(String[] filterList)
                throws ParseException
Check the current rules.

Specified by:
checkRules in interface ConnectionFilterRulesListener
Parameters:
filterList - list of filter rules.
Throws:
ParseException - a problem occurred while reading the rules.

checkRules

protected void checkRules(String[] filterList,
                          Vector entries)
                   throws ParseException
Throws:
ParseException

setRules

public void setRules(String[] filterList)
              throws ParseException
Set and check the current rules.

Specified by:
setRules in interface ConnectionFilterRulesListener
Parameters:
filterList - list of filter rules.
Throws:
ParseException - a problem occurred while reading the rules.

accept

public void accept(ConnectionEvent evt)
            throws FilterException
Filters a client connection event. If the connection should be allowed, this method returns normally.

Specified by:
accept in interface ConnectionFilter
Parameters:
evt - the connection event
Throws:
FilterException - the connection should be rejected by the server

parseLine

protected void parseLine(String line,
                         Vector entries)
                  throws IOException,
                         IllegalArgumentException
Throws:
IOException
IllegalArgumentException

parseProtocols

protected static final int parseProtocols(StringTokenizer toks)
                                   throws FilterException
Throws:
FilterException

parseAddresses

protected static final int[] parseAddresses(String str)
                                     throws IOException
Throws:
IOException

parseSingleAddress

protected static final int parseSingleAddress(String str)
                                       throws IOException
Throws:
IOException

parseNetmask

protected static final int parseNetmask(String maskStr)
                                 throws IOException
Throws:
IOException

parseAction

protected static final boolean parseAction(String whatever)
                                    throws IOException
Throws:
IOException

filterEnabled

public static final boolean filterEnabled()
Indicate whether the connection filter is enabled in this server.


getFilter

public static final ConnectionFilter getFilter()
Return the current server-wide connection filter in use, if any.


setFilter

public static final void setFilter(ConnectionFilter filter)
Deprecated. 

Set the connection filter to the given instance. This method can only be called once per server instance.

This method is deprecated. Use the ConnectionFilter attribute on the SecurityMBean instead. Any filter set through this method will not be reflected in the console.


Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs92
Copyright 2006 BEA Systems Inc.