View Javadoc

1   /*
2    * JCaptcha, the open source java framework for captcha definition and integration
3    * Copyright (c)  2007 jcaptcha.net. All Rights Reserved.
4    * See the LICENSE.txt file distributed with this package.
5    */
6   
7   package com.octo.captcha.service.sound;
8   
9   import com.octo.captcha.service.CaptchaService;
10  import com.octo.captcha.service.CaptchaServiceException;
11  
12  import javax.sound.sampled.AudioInputStream;
13  import java.util.Locale;
14  
15  /***
16   * @author <a href="mailto:marc.antoine.garrigue@gmail.com">Marc-Antoine Garrigue</a>
17   * @version 1.0
18   */
19  public interface SoundCaptchaService extends CaptchaService {
20      /***
21       * Method to retrive the sound challenge corresponding to the given ticket.
22       *
23       * @param ID the ticket
24       *
25       * @return the challenge
26       *
27       * @throws com.octo.captcha.service.CaptchaServiceException
28       *          if the ticket is invalid
29       */
30      AudioInputStream getSoundChallengeForID(String ID) throws CaptchaServiceException;
31  
32      /***
33       * Method to retrive the sound challenge corresponding to the given ticket.
34       *
35       * @param ID the ticket
36       *
37       * @return the challenge
38       *
39       * @throws com.octo.captcha.service.CaptchaServiceException
40       *          if the ticket is invalid
41       */
42      AudioInputStream getSoundChallengeForID(String ID, Locale locale) throws CaptchaServiceException;
43  
44  }