public class AnnotatedBeanProcessFactory extends AnnotationDrivenProcessFactory
To make use of this class you will need to:
ProcessFactory factory = new AnnotatedBeanProcessFactory( Text.text("Internal"),"internal", ExampleProcess);
DescribeProcess
:
@DescribeProcess( title = "bounds", description = "Computes the overlall bounds of the input features") public class BoundsProcess { ... }
@DescribeResult(name = "bounds", description = "The feature collection bounds") public ReferencedEnvelope execute( @DescribeParameter(name = "features", description = "Collection whose bounds will be computed") FeatureCollection features) { return features.getBounds(); }
public class BoundsProcess implements GeoServerProcess { ... }
Modifier and Type | Class and Description |
---|---|
static class |
AnnotatedBeanProcessFactory.BeanFactoryRegistry<T>
Subclass of FactoryRegistry meant for convenience of looking up all the classes that
implement a specific bean interface.
|
namespace
Constructor and Description |
---|
AnnotatedBeanProcessFactory(InternationalString title,
String namespace,
Class<?>... beanClasses) |
Modifier and Type | Method and Description |
---|---|
protected Object |
createProcessBean(Name name)
Create an instance of the named process bean.
|
Set<Name> |
getNames()
List of processes published; generated from the classMap created in the constructuor.
|
protected DescribeProcess |
getProcessDescription(Name name)
Used to go through the list of java beans; returning the DescribeProcess annotation for each
one.
|
protected Method |
method(String className)
Resolves to the execute method for the provided java bean.
|
public AnnotatedBeanProcessFactory(InternationalString title, String namespace, Class<?>... beanClasses)
protected DescribeProcess getProcessDescription(Name name)
getProcessDescription
in class AnnotationDrivenProcessFactory
name
- Process nameprotected Method method(String className)
method
in class AnnotationDrivenProcessFactory
public Set<Name> getNames()
protected Object createProcessBean(Name name)
By having an actual object here we allow implementors to hold onto a bit of state if they
wish. The object will need to have an
createProcessBean
in class AnnotationDrivenProcessFactory
name
- Name of the process beanCopyright © 1996–2019 Geotools. All rights reserved.