public abstract class AbstractApplication
extends java.lang.Object
Application instances need to:
buildTopology(Topology)
run()
to build and submit the topology for execution.The class provides some common processing needs:
TopologyProviderFactory
ApplicationUtilities
AbstractMqttApplication
Modifier and Type | Field and Description |
---|---|
protected java.util.Properties |
props |
protected java.lang.String |
propsPath |
protected Topology |
t |
Constructor and Description |
---|
AbstractApplication(java.lang.String propsPath) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
buildTopology(Topology t)
Build the application's topology.
|
java.util.Properties |
config()
Get the application's raw configuration information.
|
void |
handleRuntimeError(java.lang.String msg,
java.lang.Exception e) |
protected void |
preBuildTopology(Topology t)
A hook for a subclass to do things prior to the invocation
of
buildTopology(Topology) . |
protected void |
run()
Construct and run the application's topology.
|
ApplicationUtilities |
utils()
Get the application's
|
protected final java.lang.String propsPath
protected final java.util.Properties props
protected Topology t
public AbstractApplication(java.lang.String propsPath) throws java.lang.Exception
java.lang.Exception
protected void run() throws java.lang.Exception
java.lang.Exception
- on failurepublic java.util.Properties config()
public ApplicationUtilities utils()
protected void preBuildTopology(Topology t)
buildTopology(Topology)
.
The default implementation is a no-op.
t
- the application's topologyprotected abstract void buildTopology(Topology t)
t
- Topology to add topublic void handleRuntimeError(java.lang.String msg, java.lang.Exception e)
Copyright © 2016 The Apache Software Foundation. All Rights Reserved - bbe71fa-20161201-1641