public class DefaultRestartInitializer extends Object implements RestartInitializer
RestartInitializer
that only enable initial restart when running a
standard "main" method. Skips initialization when running "fat" jars (included
exploded) or when running from a test.NONE
Constructor and Description |
---|
DefaultRestartInitializer() |
Modifier and Type | Method and Description |
---|---|
URL[] |
getInitialUrls(Thread thread)
Return the initial set of URLs for the
Restarter or null if no
initial restart is required. |
protected URL[] |
getUrls(Thread thread)
Return the URLs that should be used with initialization.
|
protected boolean |
isMain(Thread thread)
Returns if the thread is for a main invocation.
|
protected boolean |
isSkippedStackElement(StackTraceElement element)
Checks if a specific
StackTraceElement should cause the initializer to be
skipped. |
public URL[] getInitialUrls(Thread thread)
RestartInitializer
Restarter
or null
if no
initial restart is required.getInitialUrls
in interface RestartInitializer
thread
- the source threadnull
protected boolean isMain(Thread thread)
thread
- the thread to checktrue
if the thread is a main invocationprotected boolean isSkippedStackElement(StackTraceElement element)
StackTraceElement
should cause the initializer to be
skipped.element
- the stack element to checktrue
if the stack element means that the initializer should be
skippedCopyright © 2018 Pivotal Software, Inc.. All rights reserved.