Class PlatformMain
- java.lang.Object
-
- com.sun.enterprise.module.bootstrap.PlatformMain
-
public abstract class PlatformMain extends java.lang.ObjectUseful delegation model for starting a hk2 instance using a service based lookup
-
-
Constructor Summary
Constructors Constructor Description PlatformMain()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T> TgetContext(java.lang.Class<T> contextType)java.util.List<java.lang.Object>getContexts()java.util.logging.LoggergetLogger()abstract java.lang.StringgetName()Returns the platform name associated with this main.<T> TgetStartedService(java.lang.Class<T> serviceType)Optional method.voidsetContext(java.lang.Object context)voidsetLogger(java.util.logging.Logger logger)abstract voidstart(java.util.Properties ctx)Starts the main entry point using this platform implementation.
-
-
-
Method Detail
-
getLogger
public java.util.logging.Logger getLogger()
-
setLogger
public void setLogger(java.util.logging.Logger logger)
-
setContext
public void setContext(java.lang.Object context)
-
getContext
public <T> T getContext(java.lang.Class<T> contextType)
-
getContexts
public java.util.List<java.lang.Object> getContexts()
-
getName
public abstract java.lang.String getName()
Returns the platform name associated with this main.- Returns:
- ther plaform name
-
start
public abstract void start(java.util.Properties ctx) throws java.lang.ExceptionStarts 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:
java.lang.Exception- if anything goes wrong
-
getStartedService
public <T> T getStartedService(java.lang.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
-
-