Package org.eclipse.hono.util
Class ConfigurationSupportingVerticle<T>
- java.lang.Object
-
- io.vertx.core.AbstractVerticle
-
- org.eclipse.hono.util.ConfigurationSupportingVerticle<T>
-
- Type Parameters:
T
- The type of configuration properties this verticle supports.
- All Implemented Interfaces:
io.vertx.core.Verticle
public abstract class ConfigurationSupportingVerticle<T> extends io.vertx.core.AbstractVerticle
A base class for implementing Verticles. This class provides support for accessing configuration properties.
-
-
Constructor Summary
Constructors Constructor Description ConfigurationSupportingVerticle()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description T
getConfig()
Gets the properties that this Verticle has been configured with.abstract void
setConfig(T configuration)
Sets the properties to use for configuring this Verticle.protected void
setSpecificConfig(T props)
Sets the specific object instance to use for configuring this Verticle.-
Methods inherited from class io.vertx.core.AbstractVerticle
config, deploymentID, getVertx, init, processArgs, start, start, stop, stop
-
-
-
-
Method Detail
-
setSpecificConfig
protected final void setSpecificConfig(T props)
Sets the specific object instance to use for configuring this Verticle.- Parameters:
props
- The properties.
-
setConfig
public abstract void setConfig(T configuration)
Sets the properties to use for configuring this Verticle.Subclasses must invoke
setSpecificConfig(Object)
with the configuration object.This method mainly exists so that subclasses can annotate its concrete implementation with Spring annotations like
Autowired
and/orQualifier
to get injected a particular bean instance.- Parameters:
configuration
- The configuration properties.- Throws:
NullPointerException
- if configuration isnull
.
-
getConfig
public final T getConfig()
Gets the properties that this Verticle has been configured with.- Returns:
- The properties or
null
if not set.
-
-