org.apache.flume.source
Class AbstractSource

java.lang.Object
  extended by org.apache.flume.source.AbstractSource
All Implemented Interfaces:
LifecycleAware, Source
Direct Known Subclasses:
AvroSource, ExecSource, NetcatSource, SequenceGeneratorSource

public abstract class AbstractSource
extends Object
implements Source


Constructor Summary
AbstractSource()
           
 
Method Summary
 Channel getChannel()
           
 LifecycleState getLifecycleState()
           Return the current state of the service or component.
 void setChannel(Channel channel)
           
 void start()
           Starts a service or component.
 void stop()
           Stops a service or component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSource

public AbstractSource()
Method Detail

start

public void start()
Description copied from interface: LifecycleAware

Starts a service or component.

Implementations should determine the result of any start logic and effect the return value of LifecycleAware.getLifecycleState() accordingly.

Specified by:
start in interface LifecycleAware

stop

public void stop()
Description copied from interface: LifecycleAware

Stops a service or component.

Implementations should determine the result of any stop logic and effect the return value of LifecycleAware.getLifecycleState() accordingly.

Specified by:
stop in interface LifecycleAware

getChannel

public Channel getChannel()
Specified by:
getChannel in interface Source

setChannel

public void setChannel(Channel channel)
Specified by:
setChannel in interface Source

getLifecycleState

public LifecycleState getLifecycleState()
Description copied from interface: LifecycleAware

Return the current state of the service or component.

Specified by:
getLifecycleState in interface LifecycleAware


Copyright © 2009-2012 Apache Software Foundation. All Rights Reserved.