Class DelegateFactory

java.lang.Object
is.galia.delegate.DelegateFactory

public final class DelegateFactory extends Object
Used to obtain Delegate instances.
  • Method Details

    • isDelegateAvailable

      public static boolean isDelegateAvailable()
      Returns:
      Whether a delegate is available, i.e. whether newDelegate(RequestContext) will return one.
    • newDelegate

      public static Delegate newDelegate(RequestContext context) throws DelegateException

      Returns a new Delegate instance.

      Normally this would be called only once at the beginning of a request lifecycle, and the returned instance passed around wherever it is needed.

      Parameters:
      context - Request context.
      Returns:
      New instance.
      Throws:
      DelegateException - if there was an error parsing the script, instantiating a delegate object, etc.