captcha
Class CaptchaGeneratorFactory

java.lang.Object
  extended by captcha.CaptchaGeneratorFactory

public class CaptchaGeneratorFactory
extends java.lang.Object

This class is a factory for creating objects, which implements the CaptchaGenerator interface. This class is a singleton;


Field Summary
private static CaptchaGeneratorFactory ms_cgfInstance
          Stores the instance of CaptchaGeneratorFactory (Singleton).
 
Constructor Summary
private CaptchaGeneratorFactory()
          This creates a new CaptchaGeneratorFactory.
 
Method Summary
 ICaptchaGenerator getCaptchaGenerator()
          Returns an object, which implements the CaptchaGenerator interface.
static CaptchaGeneratorFactory getInstance()
          Returns the instance of CaptchaGeneratorFactory (Singleton).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ms_cgfInstance

private static CaptchaGeneratorFactory ms_cgfInstance
Stores the instance of CaptchaGeneratorFactory (Singleton).

Constructor Detail

CaptchaGeneratorFactory

private CaptchaGeneratorFactory()
This creates a new CaptchaGeneratorFactory.

Method Detail

getInstance

public static CaptchaGeneratorFactory getInstance()
Returns the instance of CaptchaGeneratorFactory (Singleton). If there is no instance, a new one is created.

Returns:
The CaptchaGeneratorFactory instance.

getCaptchaGenerator

public ICaptchaGenerator getCaptchaGenerator()
Returns an object, which implements the CaptchaGenerator interface.

Returns:
A new instance of a CaptchaGenerator.