add new Factory object in java, so that filter enablement can be controlled with the new way of doing it.