rabbit.filter
Interface IPAccessFilter

All Known Implementing Classes:
AccessFilter

public interface IPAccessFilter

This interface holds the method needed to do socket based access filtering.

Author:
Robert Olofsson

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(Logger logger, Reader r)
          Loads in the accessess allowed from the given Reader
 void saveAccess(Logger logger, Reader r)
          Saves the accesslist from the given Reader.
 void setup(Logger logger, SProperties properties)
          Setup this filter.
 

Method Detail

doIPFiltering

boolean doIPFiltering(SocketChannel s)
Filter based on a socket.

Parameters:
s - the Socket to check.
Returns:
true if the Socket should be allowed, false otherwise.

setup

void setup(Logger logger,
           SProperties properties)
Setup this filter.

Parameters:
logger - the Logger to use in case of errors/warnings.
properties - the SProperties to get the settings from.

getAllowList

List<IPAccess> getAllowList()
Get the list of allowed ips


getDenyList

List<IPAccess> getDenyList()
Get the list of denied ips


loadAccess

void loadAccess(Logger logger,
                Reader r)
                throws IOException
Loads in the accessess allowed from the given Reader

Parameters:
r - the Reader were data is available
Throws:
IOException

saveAccess

void saveAccess(Logger logger,
                Reader r)
                throws IOException
Saves the accesslist from the given Reader.

Parameters:
r - the Reader with the users.
Throws:
IOException