public interface ArtifactFactory
Modifier and Type | Method and Description |
---|---|
Object |
create(String ref,
Class<?> cls,
ClassLoader classLoader)
The create method creates an instance
corresponding to a ref value from a Job XML.
|
void |
destroy(Object instance)
The destroy method destroys an instance created
by this factory.
|
Class<?> |
getArtifactClass(String ref,
ClassLoader classLoader)
Gets the class type of the artifact represented by ref.
|
Object create(String ref, Class<?> cls, ClassLoader classLoader) throws Exception
ref
- value from Job XMLcls
- the class type of the target artifact. Either ref or cls may be specified.classLoader
- the class loader for loading the artifact classException
- if instance cannot be created.void destroy(Object instance)
instance
- to destroyClass<?> getArtifactClass(String ref, ClassLoader classLoader)
ref
- the ref name of the artifactclassLoader
- the class loader for loading the artifact classCopyright © 2017 JBoss by Red Hat. All rights reserved.