IN
- as input type.T
- as the resultant output type for each tuple in the process.public class ReaderProcess<IN,T> extends Object implements Runnable, ControllableProcess<Serializable>, ChangeGenerator<Object>, IAdminPanel
AbstractReader
s to read in their own thread (non blocking UI)(TODO use that or extend that)
,
Serialized FormProcess.Event, Process.EventPoint
Constructor and Description |
---|
ReaderProcess(org.springframework.context.ConfigurableApplicationContext context) |
ReaderProcess(org.springframework.context.ConfigurableApplicationContext context,
AbstractReader<IN,T,Serializable> reader,
String anyUploadedResource,
Progression progression,
org.apache.wicket.markup.html.panel.Panel feedback,
Boolean onlyVerify,
ETLMeta<FacetMeta> meta,
String processId) |
Modifier and Type | Method and Description |
---|---|
static void |
add(ChangeListener changeListener) |
void |
addChangeListener(ChangeListener changeListener)
Allow Notify all
ChangeListener s about a change |
String |
getAnyUploadedResource() |
org.apache.wicket.markup.html.panel.Panel |
getFeedback() |
List |
getListeners()
Get list directly.
|
ETLMeta<FacetMeta> |
getMeta() |
Boolean |
getOnlyVerify() |
String |
getProcessId() |
Progression |
getProgression() |
AbstractReader<IN,T,Serializable> |
getReader() |
Serializable |
getState()
Get current state of process
|
protected void |
init()
All Thread/Reading init based activities
|
protected void |
injectContext(org.apache.commons.collections.Transformer t)
Inject context data into
ParamsAware and ReaderAware like transformer implementation. |
boolean |
isPaused() |
void |
kill()
Kill a process
|
void |
notifyAllListeners(Object object)
Whenever a node is selected/updated, it also notifies its listeners.
|
void |
pause()
Pause till resume
|
protected void |
processGeneratedEntity(T entity)
Process the final Entity produced from the ETL Process.
This is a convenient way to simply provide Transformer based processing over input/reader produced output as AbstractReader are not required at times. |
void |
resume() |
void |
resumeFromState(Serializable state)
Resume process from the given State provided
|
void |
run() |
void |
setAnyUploadedResource(String anyUploadedResource) |
void |
setFeedback(org.apache.wicket.markup.html.panel.FeedbackPanel feedback) |
void |
setListeners(List listeners)
Set list directly.
|
void |
setProgression(Progression progression) |
void |
setReader(AbstractReader<IN,T,Serializable> reader) |
void |
stop()
Request graceful Shutdown
|
protected void |
threadInit()
Init before the thread runs.
|
public ReaderProcess(org.springframework.context.ConfigurableApplicationContext context)
public ReaderProcess(org.springframework.context.ConfigurableApplicationContext context, AbstractReader<IN,T,Serializable> reader, String anyUploadedResource, Progression progression, org.apache.wicket.markup.html.panel.Panel feedback, Boolean onlyVerify, ETLMeta<FacetMeta> meta, String processId)
context
- as String Contextreader
- as AbstractReader
derived from Name of Reader matching bean nameanyUploadedResource
- as Stringprogression
- as Progression
feedback
- as Panel
onlyVerify
- as Boolean
meta
- as ETLMeta
. Like processEntityTranformer as Transformer
; process the final entity from the ETL process when onlyVerify
is false. Eample: Persist entity after it is processed and ready.processId
- as String; attributed Process Idprotected void threadInit()
protected void injectContext(org.apache.commons.collections.Transformer t)
ParamsAware
and ReaderAware
like transformer implementation.t
- as Transformer
protected void init() throws Exception
Exception
protected void processGeneratedEntity(T entity)
AbstractReader
are not required at times.entity
- as T @nullable truepublic AbstractReader<IN,T,Serializable> getReader()
public void setReader(AbstractReader<IN,T,Serializable> reader)
public String getAnyUploadedResource()
public void setAnyUploadedResource(String anyUploadedResource)
public Progression getProgression()
public void setProgression(Progression progression)
public org.apache.wicket.markup.html.panel.Panel getFeedback()
public void setFeedback(org.apache.wicket.markup.html.panel.FeedbackPanel feedback)
public Boolean getOnlyVerify()
public void stop() throws Exception
ControllableProcess
stop
in interface ControllableProcess<Serializable>
Exception
public void pause() throws Exception
ControllableProcess
pause
in interface ControllableProcess<Serializable>
Exception
public boolean isPaused()
isPaused
in interface ControllableProcess<Serializable>
public void resume() throws Exception
resume
in interface ControllableProcess<Serializable>
Exception
public void kill() throws Exception
ControllableProcess
kill
in interface ControllableProcess<Serializable>
Exception
public Serializable getState() throws Exception
ControllableProcess
getState
in interface ControllableProcess<Serializable>
Exception
public void resumeFromState(Serializable state) throws Exception
ControllableProcess
resumeFromState
in interface ControllableProcess<Serializable>
Exception
public String getProcessId()
public static void add(ChangeListener changeListener)
public void addChangeListener(ChangeListener changeListener)
ChangeGenerator
ChangeListener
s about a changeaddChangeListener
in interface ChangeGenerator<Object>
public void notifyAllListeners(Object object)
ChangeGenerator
notifyAllListeners
in interface ChangeGenerator<Object>
public List getListeners()
ChangeGenerator
getListeners
in interface ChangeGenerator<Object>
public void setListeners(List listeners)
ChangeGenerator
setListeners
in interface ChangeGenerator<Object>
Copyright © 2018. All rights reserved.