public class DefaultComponentVerifierExtension extends Object implements ComponentVerifierExtension, ComponentVerifier, CamelContextAware, ComponentAware
ComponentVerifierExtension.Result, ComponentVerifierExtension.Scope, ComponentVerifierExtension.VerificationError
Modifier | Constructor and Description |
---|---|
protected |
DefaultComponentVerifierExtension(String defaultScheme) |
protected |
DefaultComponentVerifierExtension(String defaultScheme,
CamelContext camelContext) |
protected |
DefaultComponentVerifierExtension(String defaultScheme,
CamelContext camelContext,
Component component) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
unwrap
getComponent
protected DefaultComponentVerifierExtension(String defaultScheme)
protected DefaultComponentVerifierExtension(String defaultScheme, CamelContext camelContext)
protected DefaultComponentVerifierExtension(String defaultScheme, CamelContext camelContext, Component component)
public void setCamelContext(CamelContext camelContext)
CamelContextAware
CamelContext
setCamelContext
in interface CamelContextAware
camelContext
- the Camel contextpublic CamelContext getCamelContext()
CamelContextAware
CamelContext
getCamelContext
in interface CamelContextAware
public Component getComponent()
ComponentAware
Component
getComponent
in interface ComponentAware
public void setComponent(Component component)
ComponentAware
Component
setComponent
in interface ComponentAware
component
- the componentpublic ComponentVerifierExtension.Result verify(ComponentVerifierExtension.Scope scope, Map<String,Object> parameters)
ComponentVerifierExtension
The supported scopes are:
ComponentVerifierExtension.Scope.PARAMETERS
: to validate that all the mandatory options are provided and syntactically correct.ComponentVerifierExtension.Scope.CONNECTIVITY
: to validate that the given options (i.e. credentials, addresses) are correct. Verifying with this
scope typically implies reaching out to the backend via some sort of network connection.verify
in interface ComponentVerifierExtension
scope
- the scope of the verificationparameters
- the parameters to verify which are interpreted individually by each component verifierprotected ComponentVerifierExtension.Result verifyConnectivity(Map<String,Object> parameters)
protected ComponentVerifierExtension.Result verifyParameters(Map<String,Object> parameters)
protected void verifyParametersAgainstCatalog(ResultBuilder builder, Map<String,Object> parameters)
protected void verifyParametersAgainstCatalog(ResultBuilder builder, Map<String,Object> parameters, CatalogVerifierCustomizer customizer)
protected <T> T setProperties(T instance, Map<String,Object> properties) throws Exception
Exception
protected <T> T setProperties(T instance, String prefix, Map<String,Object> properties) throws Exception
Exception
protected <T> Optional<T> getOption(Map<String,Object> parameters, String key, Class<T> type)
protected <T> T getOption(Map<String,Object> parameters, String key, Class<T> type, Supplier<T> defaultSupplier)
protected <T> T getMandatoryOption(Map<String,Object> parameters, String key, Class<T> type) throws NoSuchOptionException
NoSuchOptionException
Apache Camel