There's SimpleJobFactory class. You should probably use it.