com.octo.captcha.sound
Class SoundCaptcha

java.lang.Object
  extended by com.octo.captcha.sound.SoundCaptcha
All Implemented Interfaces:
Captcha, java.io.Serializable
Direct Known Subclasses:
GimpySound, SpellerSound, SpellFindCaptcha

public abstract class SoundCaptcha
extends java.lang.Object
implements Captcha

Description: String question about a Line challenge, this class is abstract.

See Also:
Serialized Form

Field Summary
protected  byte[] challenge
           
protected  java.lang.Boolean hasChallengeBeenCalled
           
protected  java.lang.String question
           
 
Constructor Summary
protected SoundCaptcha(java.lang.String thequestion, javax.sound.sampled.AudioInputStream thechallenge)
           
 
Method Summary
 void disposeChallenge()
          this method is to clean the challenge.
 java.lang.Object getChallenge()
          Accessor to the challenge.
 java.lang.String getQuestion()
          Accessor to the question.
 javax.sound.sampled.AudioInputStream getSoundChallenge()
          Accessor to the sound challenge.
 java.lang.Boolean hasGetChalengeBeenCalled()
          This method should return true if the getChalenge method has been called (has been added in order to properly manage the captcha state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.octo.captcha.Captcha
validateResponse
 

Field Detail

hasChallengeBeenCalled

protected java.lang.Boolean hasChallengeBeenCalled

question

protected java.lang.String question

challenge

protected byte[] challenge
Constructor Detail

SoundCaptcha

protected SoundCaptcha(java.lang.String thequestion,
                       javax.sound.sampled.AudioInputStream thechallenge)
Method Detail

getQuestion

public final java.lang.String getQuestion()
Accessor to the question.

Specified by:
getQuestion in interface Captcha
Returns:
the question

getChallenge

public final java.lang.Object getChallenge()
Accessor to the challenge.

Specified by:
getChallenge in interface Captcha
Returns:
the challenge (may be an image for image captcha...

getSoundChallenge

public final javax.sound.sampled.AudioInputStream getSoundChallenge()
Accessor to the sound challenge. Create a new stream each time the method is called.

Returns:
an AudioInputStream

disposeChallenge

public void disposeChallenge()
this method is to clean the challenge.

Specified by:
disposeChallenge in interface Captcha

hasGetChalengeBeenCalled

public java.lang.Boolean hasGetChalengeBeenCalled()
Description copied from interface: Captcha
This method should return true if the getChalenge method has been called (has been added in order to properly manage the captcha state.

Specified by:
hasGetChalengeBeenCalled in interface Captcha
Returns:
true if getChallenge has been called false otherwise.


Copyright 2003-2009 JCaptcha. All Rights Reserved.