com.octo.captcha.engine
Class GenericCaptchaEngine

java.lang.Object
  extended by com.octo.captcha.engine.GenericCaptchaEngine
All Implemented Interfaces:
CaptchaEngine

public class GenericCaptchaEngine
extends java.lang.Object
implements CaptchaEngine

Generic captcha engine, use it as default.


Constructor Summary
GenericCaptchaEngine(CaptchaFactory[] factories)
          Default constructor : takes an array of ImageCaptchaFactories.
 
Method Summary
 CaptchaFactory[] getFactories()
           
 Captcha getNextCaptcha()
          This return a new captcha.
 Captcha getNextCaptcha(java.util.Locale locale)
          This return a new captcha.
 void setFactories(CaptchaFactory[] factories)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericCaptchaEngine

public GenericCaptchaEngine(CaptchaFactory[] factories)
Default constructor : takes an array of ImageCaptchaFactories.

Method Detail

getFactories

public CaptchaFactory[] getFactories()
Specified by:
getFactories in interface CaptchaEngine
Returns:
captcha factories used by this engine

setFactories

public void setFactories(CaptchaFactory[] factories)
                  throws CaptchaEngineException
Specified by:
setFactories in interface CaptchaEngine
Parameters:
factories - new captcha factories for this engine
Throws:
CaptchaEngineException - if the factories are invalid for this engine

getNextCaptcha

public Captcha getNextCaptcha()
This return a new captcha. It may be used directly.

Specified by:
getNextCaptcha in interface CaptchaEngine
Returns:
a new Captcha

getNextCaptcha

public Captcha getNextCaptcha(java.util.Locale locale)
This return a new captcha. It may be used directly.

Specified by:
getNextCaptcha in interface CaptchaEngine
Parameters:
locale - the desired locale
Returns:
a new Captcha


Copyright 2003-2009 JCaptcha. All Rights Reserved.