T
- type of service contextV
- type of service configurerpublic abstract class AbstractHttpServiceHandler<T extends HttpServiceContext,V extends HttpServiceConfigurer> extends AbstractPluginConfigurable<V> implements HttpServiceHandler<T,V>
HttpServiceHandler
. Classes that extend this class only
have to implement a configure method which can be used to add optional arguments.Constructor and Description |
---|
AbstractHttpServiceHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
configure()
This can be overridden in child classes to add custom user properties during configure time.
|
void |
configure(V configurer)
An implementation of
HttpServiceHandler.configure(HttpServiceConfigurer) . |
void |
destroy()
An implementation of
HttpServiceHandler.destroy() which does nothing |
protected V |
getConfigurer() |
protected T |
getContext() |
void |
initialize(T context)
An implementation of
HttpServiceHandler.initialize(HttpServiceContext) . |
protected void |
setProperties(Map<String,String> properties) |
usePlugin, usePlugin, usePluginClass, usePluginClass
addDatasetModule, addDatasetType, createDataset, createDataset, createDataset, createDataset
protected void configure()
public final void configure(V configurer)
HttpServiceHandler.configure(HttpServiceConfigurer)
. Stores the
configurer so that it can be used later and then runs the configure method which is overwritten
by children classes.configure
in interface HttpServiceHandler<T extends HttpServiceContext,V extends HttpServiceConfigurer>
configurer
- the HttpServiceConfigurer
which is used to configure this
Handlerpublic void initialize(T context) throws Exception
HttpServiceHandler.initialize(HttpServiceContext)
. Stores the
context so that it can be used later.initialize
in interface ProgramLifecycle<T extends HttpServiceContext>
initialize
in interface HttpServiceHandler<T extends HttpServiceContext,V extends HttpServiceConfigurer>
context
- the HTTP service runtime contextException
- If there is any error during initialization.public void destroy()
HttpServiceHandler.destroy()
which does nothingdestroy
in interface ProgramLifecycle<T extends HttpServiceContext>
destroy
in interface HttpServiceHandler<T extends HttpServiceContext,V extends HttpServiceConfigurer>
protected final T getContext()
HttpServiceContext
which was used when this class was initializedprotected final V getConfigurer()
getConfigurer
in class AbstractPluginConfigurable<V extends HttpServiceConfigurer>
HttpServiceConfigurer
used to configure this classprotected void setProperties(Map<String,String> properties)
properties
- the properties to setHttpServiceConfigurer.setProperties(java.util.Map)
Copyright © 2024 Cask Data, Inc. Licensed under the Apache License, Version 2.0.