|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.octo.captcha.service.AbstractCaptchaService
com.octo.captcha.service.AbstractManageableCaptchaService
com.octo.captcha.service.multitype.GenericManageableCaptchaService
public class GenericManageableCaptchaService
Generic and new default captchaService implementation. Can accept and serve any captcha type.
beware of class
cast exception if you call the wrong typed getChallenge method!
| Field Summary |
|---|
| Fields inherited from class com.octo.captcha.service.AbstractCaptchaService |
|---|
engine, logger, store |
| Constructor Summary | |
|---|---|
GenericManageableCaptchaService(CaptchaEngine captchaEngine,
int minGuarantedStorageDelayInSeconds,
int maxCaptchaStoreSize,
int captchaStoreLoadBeforeGarbageCollection)
Constructor with FastHashMapCaptchaStore |
|
GenericManageableCaptchaService(CaptchaStore captchaStore,
CaptchaEngine captchaEngine,
int minGuarantedStorageDelayInSeconds,
int maxCaptchaStoreSize,
int captchaStoreLoadBeforeGarbageCollection)
|
|
| Method Summary | |
|---|---|
protected java.lang.Object |
getChallengeClone(Captcha captcha)
This method : Retrieve the challenge from the captcha Make and return a clone of the challenge Return the clone It has be design in order to let the service dipose the challenge of the captcha after rendering. |
java.awt.image.BufferedImage |
getImageChallengeForID(java.lang.String ID)
Method to retrive the image challenge corresponding to the given ticket. |
java.awt.image.BufferedImage |
getImageChallengeForID(java.lang.String ID,
java.util.Locale locale)
Method to retrive the image challenge corresponding to the given ticket. |
javax.sound.sampled.AudioInputStream |
getSoundChallengeForID(java.lang.String ID)
Method to retrive the sound challenge corresponding to the given ticket. |
javax.sound.sampled.AudioInputStream |
getSoundChallengeForID(java.lang.String ID,
java.util.Locale locale)
Method to retrive the sound challenge corresponding to the given ticket. |
java.lang.String |
getTextChallengeForID(java.lang.String ID)
Method to retrive the text challenge corresponding to the given ticket. |
java.lang.String |
getTextChallengeForID(java.lang.String ID,
java.util.Locale locale)
Method to retrieve the text challenge corresponding to the given ticket. |
| Methods inherited from class com.octo.captcha.service.AbstractCaptchaService |
|---|
getChallengeForID, getChallengeForID, getQuestionForID, getQuestionForID |
| 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.service.CaptchaService |
|---|
getChallengeForID, getChallengeForID, getQuestionForID, getQuestionForID, validateResponseForID |
| Constructor Detail |
|---|
public GenericManageableCaptchaService(CaptchaEngine captchaEngine,
int minGuarantedStorageDelayInSeconds,
int maxCaptchaStoreSize,
int captchaStoreLoadBeforeGarbageCollection)
captchaEngine - the used engine. Use the com.octo.captcha.engine.bufferedengine.BufferedEngineContainer
to enable buffered captcha generation
public GenericManageableCaptchaService(CaptchaStore captchaStore,
CaptchaEngine captchaEngine,
int minGuarantedStorageDelayInSeconds,
int maxCaptchaStoreSize,
int captchaStoreLoadBeforeGarbageCollection)
| Method Detail |
|---|
public java.awt.image.BufferedImage getImageChallengeForID(java.lang.String ID)
throws CaptchaServiceException
getImageChallengeForID in interface ImageCaptchaServiceID - the ticket
CaptchaServiceException - if the ticket is invalid
public java.awt.image.BufferedImage getImageChallengeForID(java.lang.String ID,
java.util.Locale locale)
throws CaptchaServiceException
getImageChallengeForID in interface ImageCaptchaServiceID - the ticket
CaptchaServiceException - if the ticket is invalid
public javax.sound.sampled.AudioInputStream getSoundChallengeForID(java.lang.String ID)
throws CaptchaServiceException
getSoundChallengeForID in interface SoundCaptchaServiceID - the ticket
CaptchaServiceException - if the ticket is invalid
public javax.sound.sampled.AudioInputStream getSoundChallengeForID(java.lang.String ID,
java.util.Locale locale)
throws CaptchaServiceException
getSoundChallengeForID in interface SoundCaptchaServiceID - the ticket
CaptchaServiceException - if the ticket is invalid
public java.lang.String getTextChallengeForID(java.lang.String ID)
throws CaptchaServiceException
getTextChallengeForID in interface TextCaptchaServiceID - the ticket
CaptchaServiceException - if the ticket is invalid
public java.lang.String getTextChallengeForID(java.lang.String ID,
java.util.Locale locale)
throws CaptchaServiceException
getTextChallengeForID in interface TextCaptchaServiceID - the ticket
CaptchaServiceException - if the ticket is invalidprotected java.lang.Object getChallengeClone(Captcha captcha)
getChallengeClone in class AbstractCaptchaService
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||