public class Executor extends Object implements MicroserviceProvider, ProvidingSilverService
| Modifier and Type | Class and Description |
|---|---|
class |
Executor.ShutdownHook |
| Modifier and Type | Field and Description |
|---|---|
static String |
BOOT_THREAD
Name of the thread that boots the platform.
|
static String |
MAIN_THREAD
Name of the main thread of the platform.
|
static String |
SHUTDOWN_HOOK
Property to omit a shutdown hook.
|
static String |
THREAD_PREFIX
Prefix of names of threads running Microservice providers.
|
| Constructor and Description |
|---|
Executor() |
| Modifier and Type | Method and Description |
|---|---|
static void |
bootHook()
The main entry point to the platform.
|
static void |
bootHook(Context initialContext)
The main entry point to the platform.
|
Context |
getContext()
Gets the current context this instance has been created with.
|
void |
initialize(Context context) |
Set<Object> |
lookupMicroservice(MicroserviceMetaData metaData)
Looks up all available Microservices supported by this provider.
|
void |
run()
Searches for Microservice providers, creates their instances and starts them.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlookupLocalMicroservicepublic static final String THREAD_PREFIX
public static final String BOOT_THREAD
public static final String MAIN_THREAD
public static final String SHUTDOWN_HOOK
public static void bootHook()
throws InterruptedException
InterruptedException - If the main thread fails for any reason.public static void bootHook(Context initialContext) throws InterruptedException
initialContext - The context associated with this platform instance.InterruptedException - If the main thread was interrupted. This does not mean anything wrong has happened - it is a normal shutdown procedure.public void initialize(Context context)
initialize in interface MicroserviceProviderpublic void run()
run in interface MicroserviceProviderrun in interface Runnablepublic Set<Object> lookupMicroservice(MicroserviceMetaData metaData)
ProvidingSilverServicelookupMicroservice in interface ProvidingSilverServicemetaData - Meta-data query.public Context getContext()
SilverServicegetContext in interface SilverServiceCopyright © 2015–2016 px3. All rights reserved.