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 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

Returns:
the list of allowed accesses

getDenyList

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

Returns:
the list of denied accesses

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 - if loading fails