T
- target typepublic class FunctionRegistration<T> extends Object implements org.springframework.beans.factory.BeanNameAware
Modifier and Type | Field and Description |
---|---|
static String |
REGISTRATION_NAME_SUFFIX
Suffix used to add to the name of FunctionRegistration bean that
corresponds to the an actual function bean.
|
Constructor and Description |
---|
FunctionRegistration(T target,
String... names)
Creates instance of FunctionRegistration.
|
Modifier and Type | Method and Description |
---|---|
Set<String> |
getNames() |
Map<String,String> |
getProperties() |
T |
getTarget() |
FunctionType |
getType() |
FunctionRegistration<T> |
name(String name) |
FunctionRegistration<T> |
names(Collection<String> names) |
FunctionRegistration<T> |
names(String... names) |
FunctionRegistration<T> |
properties(Map<String,String> properties) |
void |
setBeanName(String name) |
void |
setNames(Set<String> names)
Will set the names for this registration clearing all previous names first.
|
FunctionRegistration<T> |
target(T target)
Allows to override the target of this registration with a new target that typically
wraps the original target.
|
FunctionRegistration<T> |
type(FunctionType type) |
FunctionRegistration<T> |
type(Type type) |
<S> FunctionRegistration<S> |
wrap()
Transforms (wraps) function identified by the 'target' to its
Flux
equivalent unless it already is. |
public static String REGISTRATION_NAME_SUFFIX
public FunctionRegistration(T target, String... names)
target
- instance of Supplier
, Function
or Consumer
names
- additional set of names for this registration. Additional names can be
provided name(String)
or names(String...)
operations.public void setNames(Set<String> names)
names(Collection)
or name(String)
or names(String...)
operations.names
- - bean namespublic FunctionType getType()
public T getTarget()
public FunctionRegistration<T> properties(Map<String,String> properties)
public FunctionRegistration<T> type(Type type)
public FunctionRegistration<T> type(FunctionType type)
public FunctionRegistration<T> target(T target)
Flux
counterpart (e.g., Function into FluxFunction)target
- new targetpublic FunctionRegistration<T> name(String name)
public FunctionRegistration<T> names(Collection<String> names)
public FunctionRegistration<T> names(String... names)
public <S> FunctionRegistration<S> wrap()
Flux
equivalent unless it already is. For example, Function<String, String>
becomes Function<Flux<String>, Flux<String>>
S
- the expected target type of the function (e.g., FluxFunction)FunctionRegistration
with the appropriately wrapped target.public void setBeanName(String name)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.