java.lang.Object
com.sun.enterprise.module.bootstrap.PlatformMain
Useful delegation model for starting a hk2 instance using a service based
lookup
- Author:
- Jerome Dochez
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TgetContext(Class<T> contextType) abstract StringgetName()Returns the platform name associated with this main.<T> TgetStartedService(Class<T> serviceType) Optional method.voidsetContext(Object context) voidabstract voidstart(Properties ctx) Starts the main entry point using this platform implementation.
-
Field Details
-
logger
-
root
-
-
Constructor Details
-
PlatformMain
public PlatformMain()
-
-
Method Details
-
getLogger
-
setLogger
-
setContext
-
getContext
-
getContexts
-
getName
Returns the platform name associated with this main.- Returns:
- ther plaform name
-
start
Starts the main entry point using this platform implementation.- Parameters:
ctx- Context in which this object executes. It contains arguments passed to the program as well.- Throws:
Exception- if anything goes wrong
-
getStartedService
Optional method. Returns singleton services after the start method was executed successfully.- Type Parameters:
T- service type- Parameters:
serviceType- type of the requested service- Returns:
- service instance
-