Package org.apache.storm.flux
Class FluxBuilder
java.lang.Object
org.apache.storm.flux.FluxBuilder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Config
buildConfig
(TopologyDef topologyDef) Given a topology definition, return a populated `org.apache.storm.Config` instance.static StormTopology
buildTopology
(ExecutionContext context) Given a topology definition, return a Storm topology that can be run either locally or remotely.static void
invokeConfigMethods
(ObjectDef bean, Object instance, ExecutionContext context) Invokes configuration methods on an class instance.static boolean
isPrimitiveBoolean
(Class clazz) static boolean
isPrimitiveNumber
(Class clazz)
-
Constructor Details
-
FluxBuilder
public FluxBuilder()
-
-
Method Details
-
buildConfig
Given a topology definition, return a populated `org.apache.storm.Config` instance.- Parameters:
topologyDef
- topology definition- Returns:
- a Storm Config object
-
buildTopology
public static StormTopology buildTopology(ExecutionContext context) throws IllegalAccessException, InstantiationException, ClassNotFoundException, NoSuchMethodException, InvocationTargetException, NoSuchFieldException Given a topology definition, return a Storm topology that can be run either locally or remotely.- Parameters:
context
- execution context- Returns:
- A runable Storm topology
- Throws:
IllegalAccessException
- if security policy disallows operationInstantiationException
- if a class can't be instantiatedClassNotFoundException
- if a class can't be foundNoSuchMethodException
- if a method can't be foundInvocationTargetException
- if method invocation failsNoSuchFieldException
- if a referenced field does not exist
-
invokeConfigMethods
public static void invokeConfigMethods(ObjectDef bean, Object instance, ExecutionContext context) throws InvocationTargetException, IllegalAccessException Invokes configuration methods on an class instance.- Parameters:
bean
- the bean/component definitioninstance
- the class instance being operated oncontext
- execution context- Throws:
InvocationTargetException
- if method invocation failsIllegalAccessException
- if security policy prefents invocation
-
isPrimitiveNumber
-
isPrimitiveBoolean
-