Class PlatformMain
java.lang.Object
com.sun.enterprise.module.bootstrap.PlatformMain
Useful delegation model for starting a hk2 instance using a service based
lookup
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
getContext
(Class<T> contextType) abstract String
getName()
Returns the platform name associated with this main.<T> T
getStartedService
(Class<T> serviceType) Optional method.void
setContext
(Object context) void
abstract void
start
(Properties ctx) Starts the main entry point using this platform implementation.
-
Field Details
-
logger
-
root
-
contexts
-
-
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
-