com.sun.enterprise.module.bootstrap
Class PlatformMain
java.lang.Object
com.sun.enterprise.module.bootstrap.PlatformMain
public abstract class PlatformMain
- extends Object
Useful delegation model for starting a hk2 instance using a service based
lookup
- Author:
- Jerome Dochez
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected Logger logger
root
protected File root
PlatformMain
public PlatformMain()
getLogger
public Logger getLogger()
setLogger
public void setLogger(Logger logger)
setContext
public void setContext(Object context)
getContext
public <T> T getContext(Class<T> contextType)
getContexts
public List<Object> getContexts()
getName
public abstract String getName()
- Returns the platform name associated with this main.
- Returns:
- ther plaform name
start
public abstract void start(Properties ctx)
throws Exception
- 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
public <T> T getStartedService(Class<T> serviceType)
- 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
Copyright © 2013 Oracle Corporation. All Rights Reserved.