public Optional<ApplicationTaskContextFactory<ApplicationTaskContext>> getApplicationTaskContextFactory() {
    @SuppressWarnings("unchecked") // ok because all context types are at least ApplicationTaskContext
    Optional<ApplicationTaskContextFactory<ApplicationTaskContext>> factoryOptional =
        (Optional) this.applicationTaskContextFactoryOptional;
    return factoryOptional;
  }
Get the {@link ApplicationTaskContextFactory} specified by the application.

@return {@link ApplicationTaskContextFactory} if application specified it; empty otherwise
samza-core/src/main/java/org/apache/samza/application/descriptors/ApplicationDescriptorImpl.java