public class BundledJarRunnable extends Object implements TwillRunnable
BundledJarRunnable to run a bundled jar.| Constructor and Description |
|---|
BundledJarRunnable() |
| Modifier and Type | Method and Description |
|---|---|
TwillRunnableSpecification |
configure()
Called at submission time.
|
void |
destroy()
Called when the
Runnable.run() completed. |
protected void |
doInitialize(TwillContext context) |
protected BundledJarRunner.Arguments |
getArguments() |
void |
handleCommand(Command command)
Called when a command is received.
|
void |
initialize(TwillContext context)
Called when the container process starts.
|
void |
run() |
protected void |
setMainArgs(String mainArgs) |
protected void |
setMainArgs(String[] mainArgs) |
void |
stop()
Requests to stop the running service.
|
public void stop()
TwillRunnablestop in interface TwillRunnableprotected void doInitialize(TwillContext context)
protected BundledJarRunner.Arguments getArguments()
protected void setMainArgs(String[] mainArgs)
protected void setMainArgs(String mainArgs)
public TwillRunnableSpecification configure()
TwillRunnableconfigure in interface TwillRunnableTwillRunnableSpecification built by TwillRunnableSpecification.Builder.public final void initialize(TwillContext context)
TwillRunnableinitialize in interface TwillRunnablecontext - Contains information about the runtime context.public void handleCommand(Command command) throws Exception
TwillRunnableException should be thrown.handleCommand in interface TwillRunnablecommand - Contains details of the command.Exceptionpublic void destroy()
TwillRunnableRunnable.run() completed. Useful for doing
resource cleanup. This method would only get called if the call to TwillRunnable.initialize(TwillContext) was
successful.destroy in interface TwillRunnableCopyright © 2013-2016 The Apache Software Foundation. All rights reserved.