Class FunctionRegistration<T>
java.lang.Object
org.springframework.cloud.function.context.FunctionRegistration<T>
- Type Parameters:
T
- target type
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
public class FunctionRegistration<T>
extends Object
implements org.springframework.beans.factory.BeanNameAware
- Author:
- Dave Syer, Oleg Zhurakousky
-
Field Summary
Modifier and TypeFieldDescriptionstatic String
Suffix used to add to the name of FunctionRegistration bean that corresponds to the an actual function bean. -
Constructor Summary
ConstructorDescriptionFunctionRegistration
(T target, String... names) Creates instance of FunctionRegistration. -
Method Summary
Modifier and TypeMethodDescriptiongetNames()
getType()
names
(Collection<String> names) properties
(Map<String, String> properties) void
setBeanName
(String name) void
Will set the names for this registration clearing all previous names first.Allows to override the target of this registration with a new target that typically wraps the original target.type
(FunctionType type)
-
Field Details
-
REGISTRATION_NAME_SUFFIX
Suffix used to add to the name of FunctionRegistration bean that corresponds to the an actual function bean. It is often used when the actual function bean may not be a java Function (e.g., Kotlin) and certain custom wrapping is required.
NOTE: This is not intended as oublis API
-
-
Constructor Details
-
FunctionRegistration
Creates instance of FunctionRegistration.- Parameters:
target
- instance ofSupplier
,Function
orConsumer
names
- additional set of names for this registration. Additional names can be providedname(String)
ornames(String...)
operations.
-
-
Method Details
-
getProperties
-
getNames
-
setNames
Will set the names for this registration clearing all previous names first. If you want to add a name or set or names to the existing set of names usenames(Collection)
orname(String)
ornames(String...)
operations.- Parameters:
names
- - bean names
-
getType
-
getTarget
-
properties
-
type
-
type
-
target
Allows to override the target of this registration with a new target that typically wraps the original target. This typically happens when original target is wrapped into itsFlux
counterpart (e.g., Function into FluxFunction)- Parameters:
target
- new target- Returns:
- this registration with new target
-
name
-
names
-
names
-
setBeanName
- Specified by:
setBeanName
in interfaceorg.springframework.beans.factory.BeanNameAware
-