public abstract class AbstractProcessor extends Object
| Modifier and Type | Field and Description |
|---|---|
private long |
delay |
private static org.slf4j.Logger |
LOGGER |
private String |
name |
private boolean |
running |
| Constructor and Description |
|---|
AbstractProcessor(String name,
long delayMillis) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Override destroy to clean up resources after stopping the processor
|
String |
getName() |
void |
initialize()
Override initialize to initialize resources before starting the processor
|
boolean |
isRunning() |
abstract void |
process()
The actual work the processor is doing.
|
void |
start() |
void |
stop() |
private static final org.slf4j.Logger LOGGER
private final String name
private final long delay
private boolean running
public AbstractProcessor(String name, long delayMillis)
public abstract void process()
throws InterruptedException,
IOException
InterruptedExceptionIOExceptionpublic void initialize()
throws Exception
Exceptionpublic void destroy()
throws Exception
Exceptionpublic boolean isRunning()
public final void stop()
public String getName()
Copyright © 2019 JBoss by Red Hat. All rights reserved.