com.octo.captcha.engine.sound
Class SoundCaptchaEngine

java.lang.Object
  extended by com.octo.captcha.engine.sound.SoundCaptchaEngine
All Implemented Interfaces:
CaptchaEngine
Direct Known Subclasses:
DefaultSoundCaptchaEngine, ListSoundCaptchaEngine

public abstract class SoundCaptchaEngine
extends java.lang.Object
implements CaptchaEngine

Description: abstract base class for SoundCaptcha engines

.


Field Summary
protected  java.util.List factories
           
protected  java.util.Random myRandom
           
 
Constructor Summary
SoundCaptchaEngine()
           
 
Method Summary
protected  void checkNotNullOrEmpty(CaptchaFactory[] factories)
           
 CaptchaFactory[] getFactories()
           
 Captcha getNextCaptcha()
          This return a new captcha.
 Captcha getNextCaptcha(java.util.Locale locale)
          This return a new captcha.
 SoundCaptcha getNextSoundCaptcha()
          This method build a SoundCaptchaFactory.
 SoundCaptcha getNextSoundCaptcha(java.util.Locale locale)
          This method build a SoundCaptchaFactory.
 SoundCaptchaFactory getSoundCaptchaFactory()
          This method build a SoundCaptchaFactory.
 void setFactories(CaptchaFactory[] factories)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factories

protected java.util.List factories

myRandom

protected java.util.Random myRandom
Constructor Detail

SoundCaptchaEngine

public SoundCaptchaEngine()
Method Detail

getNextCaptcha

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

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

getNextCaptcha

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

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

checkNotNullOrEmpty

protected void checkNotNullOrEmpty(CaptchaFactory[] factories)

getSoundCaptchaFactory

public SoundCaptchaFactory getSoundCaptchaFactory()
This method build a SoundCaptchaFactory.

Returns:
a CaptchaFactory

getNextSoundCaptcha

public SoundCaptcha getNextSoundCaptcha()
This method build a SoundCaptchaFactory.

Returns:
a SoundCaptcha

getNextSoundCaptcha

public SoundCaptcha getNextSoundCaptcha(java.util.Locale locale)
This method build a SoundCaptchaFactory.

Returns:
a SoundCaptcha


Copyright 2003-2009 JCaptcha. All Rights Reserved.