fr.cnes.sitools.security.filter
Class IPBlackListTreeSet

java.lang.Object
  extended by fr.cnes.sitools.security.filter.IPBlackListTreeSet
All Implemented Interfaces:
StringContainer

public class IPBlackListTreeSet
extends java.lang.Object
implements StringContainer

Optimized implementation of StringContainer

Author:
jp.boignard (AKKA Technologies)

Constructor Summary
IPBlackListTreeSet(org.restlet.Context context)
          Constructor
 
Method Summary
 void backList(java.lang.String ip)
          Black list a new ip address
 boolean contains(java.lang.String ip)
          Abstract method to check if ip is black listed
 org.restlet.Context getContext()
          Getter of Restlet context
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IPBlackListTreeSet

public IPBlackListTreeSet(org.restlet.Context context)
Constructor

Parameters:
context - Context
Method Detail

contains

public boolean contains(java.lang.String ip)
Description copied from interface: StringContainer
Abstract method to check if ip is black listed

Specified by:
contains in interface StringContainer
Parameters:
ip - String IP address (X.X.X.X with X between 0 and 255)
Returns:
true if ip is blacklisted

backList

public void backList(java.lang.String ip)
Black list a new ip address

Parameters:
ip - String IP address (X.X.X.X with X between 0 and 255)

getContext

public org.restlet.Context getContext()
Getter of Restlet context

Returns:
Context


Copyright © 2010-2013 CNES. All Rights Reserved.