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
-
-
Constructor Summary
Constructors Constructor Description PlatformMain()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T> T
getContext(Class<T> contextType)
List<Object>
getContexts()
Logger
getLogger()
abstract String
getName()
Returns the platform name associated with this main.<T> T
getStartedService(Class<T> serviceType)
Optional method.void
setContext(Object context)
void
setLogger(Logger logger)
abstract void
start(Properties ctx)
Starts the main entry point using this platform implementation.
-
-
-
Method Detail
-
getLogger
public Logger getLogger()
-
setLogger
public void setLogger(Logger logger)
-
setContext
public void setContext(Object context)
-
getContext
public <T> T getContext(Class<T> contextType)
-
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
-
-