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(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 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(SProperties properties)
Setup this filter.

Parameters:
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(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(Reader r)
                throws IOException
Saves the accesslist from the given Reader.

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