AccessFilter (RabbIT/4)
Date: 2009-12-20

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rabbit.filter
Class AccessFilter

    java.lang.Object
      rabbit.filter.AccessFilter

All Implemented Interfaces:
  IPAccessFilter

    public class AccessFilter

extends Object
implements IPAccessFilter

This is a class that filters access based on ip adress.

Author:
  Robert Olofsson

Constructor Summary
`AccessFilter()`

Method Summary
`boolean` | `doIPFiltering(SocketChannel s)` Filter based on a socket.
`List<IPAccess>` | `getAllowList()` Get the list of allowed ips
`List<IPAccess>` | `getDenyList()` Get the list of denied ips
`void` | `loadAccess(Reader r)` Loads in the accessess allowed from the given Reader
`void` | `saveAccess(Reader r)` Saves the accesslist from the given Reader.
`void` | `setup(SProperties properties)` Setup this class.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AccessFilter

    public AccessFilter()

Method Detail

### doIPFiltering

    public boolean doIPFiltering(SocketChannel s)

  Filter based on a socket.

  Specified by:
    `doIPFiltering` in interface `IPAccessFilter`
  Parameters:
    `s` - the SocketChannel to check.
  Returns:
    true if the Socket should be allowed, false otherwise.

### setup

    public void setup(SProperties properties)

  Setup this class.

  Specified by:
    `setup` in interface `IPAccessFilter`
  Parameters:
    `properties` - the Properties to get the settings from.

### loadAccess

    public void loadAccess(Reader r)
                    throws IOException

  Loads in the accessess allowed from the given Reader

  Specified by:
    `loadAccess` in interface `IPAccessFilter`
  Parameters:
    `r` - the Reader were data is available
  Throws:
    `IOException`

### saveAccess

    public void saveAccess(Reader r)
                    throws IOException

  Saves the accesslist from the given Reader.

  Specified by:
    `saveAccess` in interface `IPAccessFilter`
  Parameters:
    `r` - the Reader with the users.
  Throws:
    `IOException`

### getAllowList

    public List<IPAccess> getAllowList()

  Get the list of allowed ips

  Specified by:
    `getAllowList` in interface `IPAccessFilter`

### getDenyList

    public List<IPAccess> getDenyList()

  Get the list of denied ips

  Specified by:
    `getDenyList` in interface `IPAccessFilter`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD