public class HTTPSource extends SslContextAwareAbstractSource implements EventDrivenSource, Configurable
port: port to which the server should bind. Mandatory
handler: the class that deserializes a HttpServletRequest into a list of flume events. This class must implement HTTPSourceHandler. Default: JSONHandler.
handler.* Any configuration to be passed to the handler.
All events deserialized from one Http request are committed to the channel in one transaction, thus allowing for increased efficiency on channels like the file channel. If the handler throws an exception this source will return a HTTP status of 400. If the channel is full, or the source is unable to append events to the channel, the source will return a HTTP 503 - Temporarily unavailable status. A JSON handler which converts JSON objects to Flume events is provided.
Constructor and Description |
---|
HTTPSource() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Context context)
Request the implementing class to (re)configure itself.
|
protected void |
configureSsl(Context context) |
void |
start()
Starts a service or component.
|
void |
stop()
Stops a service or component.
|
getExcludeCipherSuites, getExcludeProtocols, getFilteredCipherSuites, getFilteredProtocols, getIncludeCipherSuites, getIncludeProtocols, getKeystore, getKeystorePassword, getKeystoreType, getSslContextSupplier, getSslEngineSupplier, isSslEnabled
getChannelProcessor, getLifecycleState, getName, setChannelProcessor, setName, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getChannelProcessor, setChannelProcessor
getLifecycleState
getName, setName
public void configure(Context context)
Configurable
Request the implementing class to (re)configure itself.
When configuration parameters are changed, they must be reflected by the component asap.
There are no thread safety guarantees on when configure might be called.
configure
in interface Configurable
public void start()
LifecycleAware
Starts a service or component.
Implementations should determine the result of any start logic and effect
the return value of LifecycleAware.getLifecycleState()
accordingly.
start
in interface LifecycleAware
start
in class AbstractSource
public void stop()
LifecycleAware
Stops a service or component.
Implementations should determine the result of any stop logic and effect
the return value of LifecycleAware.getLifecycleState()
accordingly.
stop
in interface LifecycleAware
stop
in class AbstractSource
protected void configureSsl(Context context)
configureSsl
in class SslContextAwareAbstractSource
Copyright © 2009–2019 Apache Software Foundation. All rights reserved.