public class Pipeline extends Object implements IPipeline, IObservable, IObserver
IPipeline interface.| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_ID |
| Constructor and Description |
|---|
Pipeline()
Creates a new Pipeline object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addObserver(IObserver observer)
Attaches a observer to the Observable.
|
void |
addStep(IPipelineStep step)
Adds a step to this pipeline.
|
void |
cancel()
Cancels processing on this pipeline.
|
void |
clearSteps()
Remove all the
IPipelineSteps from the pipeline. |
int |
countObservers()
Counts how many Observers were attached to this class.
|
void |
deleteObserver(IObserver observer)
Detaches a previously attached observer to the observable.
|
void |
deleteObservers()
Detaches all previously attached observer to the observable.
|
void |
destroy()
Frees all resources from all steps in this pipeline.
|
void |
endBatch()
Finishes a batch of inputs.
|
String |
getId()
Get the Pipelines identifier.
|
List<IObserver> |
getObservers()
Returns list of observers registered with the Observable.
|
PipelineReturnValue |
getState()
Gets the current pipeline state.
|
List<IPipelineStep> |
getSteps()
Gets the list of all steps in this pipeline.
|
void |
notifyObservers()
Notifies all attached observers about changes in the observable.
|
void |
notifyObservers(Object arg)
Notifies all attached observers about changes in the observable.
|
void |
process(Event input)
|
void |
process(RawDocument input)
Starts
IPipeline processing with a RawDocument as input. |
void |
setId(String id)
Set the pipelines identifier.
|
void |
startBatch()
Starts a batch of inputs.
|
void |
update(IObservable o,
Object arg)
This method is called whenever the observed object is changed.
|
public static final String DEFAULT_ID
public void startBatch()
IPipelinestartBatch in interface IPipelinepublic void endBatch()
IPipelinepublic void addStep(IPipelineStep step)
IPipelinepublic List<IPipelineStep> getSteps()
IPipelinepublic void cancel()
IPipelinepublic PipelineReturnValue getState()
IPipelinepublic void process(RawDocument input)
IPipelineIPipeline processing with a RawDocument as input. This is a convenience method that calls
IPipeline.process(Event).public void destroy()
IPipelinepublic void clearSteps()
IPipelineIPipelineSteps from the pipeline. Also calls the destroy() method on each step.clearSteps in interface IPipelinepublic String getId()
IPipelinepublic void setId(String id)
IPipelinepublic void update(IObservable o, Object arg)
IObserverpublic void addObserver(IObserver observer)
IObservableaddObserver in interface IObservableobserver - The observer to attach to the observablepublic int countObservers()
IObservablecountObservers in interface IObservableIObserverpublic void deleteObserver(IObserver observer)
IObservabledeleteObserver in interface IObservableobserver - The observer to detach from the observablepublic void notifyObservers()
IObservablenotifyObservers in interface IObservablepublic void notifyObservers(Object arg)
IObservablenotifyObservers in interface IObservablearg - an arbitrary Object to be passed to the Observerpublic void deleteObservers()
IObservabledeleteObservers in interface IObservablepublic List<IObserver> getObservers()
IObservablegetObservers in interface IObservableCopyright © 2021. All rights reserved.