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()
TwillRunnable
stop
in interface TwillRunnable
protected void doInitialize(TwillContext context)
protected BundledJarRunner.Arguments getArguments()
protected void setMainArgs(String[] mainArgs)
protected void setMainArgs(String mainArgs)
public TwillRunnableSpecification configure()
TwillRunnable
configure
in interface TwillRunnable
TwillRunnableSpecification
built by TwillRunnableSpecification.Builder
.public final void initialize(TwillContext context)
TwillRunnable
initialize
in interface TwillRunnable
context
- Contains information about the runtime context.public void handleCommand(Command command) throws Exception
TwillRunnable
Exception
should be thrown.handleCommand
in interface TwillRunnable
command
- Contains details of the command.Exception
public void destroy()
TwillRunnable
Runnable.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 TwillRunnable
Copyright © 2013-2016 The Apache Software Foundation. All rights reserved.