fr.cnes.sitools.security.captcha
Class CaptchaContainer

java.lang.Object
  extended by fr.cnes.sitools.security.captcha.CaptchaContainer

public class CaptchaContainer
extends java.lang.Object

Basic in memory Captcha container

Author:
jp.boignard (AKKA Technologies)

Constructor Summary
CaptchaContainer()
           
 
Method Summary
 void delete(java.lang.String id)
          Delete a captcha when no more useful
 Captcha get(java.lang.String id)
          Getter an ever existent captcha Can be do only one time.
 Captcha post(java.lang.Integer width, java.lang.Integer height, java.lang.Integer length)
          Get a new captcha
 void recyclingDuration(int seconds)
          recycling old captchas
 void recyclingSize(int limit)
          limiting captchas
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaptchaContainer

public CaptchaContainer()
Method Detail

get

public Captcha get(java.lang.String id)
Getter an ever existent captcha Can be do only one time.

Parameters:
id - captcha identifier
Returns:
Captcha

post

public Captcha post(java.lang.Integer width,
                    java.lang.Integer height,
                    java.lang.Integer length)
Get a new captcha

Parameters:
width - int width in pixel of the required generated image
height - int heigth in pixem of the required generated image
length - int number of characters for the generated answer
Returns:
Captcha

delete

public void delete(java.lang.String id)
Delete a captcha when no more useful

Parameters:
id - Captcha identifier

recyclingDuration

public void recyclingDuration(int seconds)
recycling old captchas

Parameters:
seconds - maxduration of a captcha in container.

recyclingSize

public void recyclingSize(int limit)
limiting captchas

Parameters:
limit - max number of captcha in container


Copyright © 2010-2013 CNES. All Rights Reserved.