Top Description Fields Constructors Methods
com.sun.enterprise.module.bootstrap

public abstract Class PlatformMain

extends Object
Class Inheritance
Imports
java.util.logging.Logger, java.util.List, .ArrayList, .Properties, java.io.File

Useful delegation model for starting a hk2 instance using a service based lookup
Author
Jerome Dochez

Field Summary

Modifier and TypeField and Description
pack-priv List<Object>
protected Logger
protected File

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public <T> T
getContext(Class<T> contextType)

public List<Object>
public Logger
public abstract String

Returns:

ther plaform name
getName
()

Returns the platform name associated with this main.

public <
service type
T
>
T

Returns:

service instance
getStartedService
(Class<T>
type of the requested service
serviceType
)

Optional method.

public void
setContext(Object context)

public void
setLogger(Logger logger)

public abstract void
start(Properties
Context in which this object executes. It contains arguments passed to the program as well.
ctx
)

Starts the main entry point using this platform implementation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextsback to summary
pack-priv List<Object> contexts
loggerback to summary
protected Logger logger
rootback to summary
protected File root

Constructor Detail

PlatformMainback to summary
public PlatformMain()

Method Detail

getContextback to summary
public <T> T getContext(Class<T> contextType)
getContextsback to summary
public List<Object> getContexts()
getLoggerback to summary
public Logger getLogger()
getNameback to summary
public abstract String getName()

Returns the platform name associated with this main.

Returns:String

ther plaform name

getStartedServiceback to summary
public <T> T getStartedService(Class<T> serviceType)

Optional method. Returns singleton services after the start method was executed successfully.

Parameters
<T>
service type
serviceType:Class<T>

type of the requested service

Returns:T

service instance

setContextback to summary
public void setContext(Object context)
setLoggerback to summary
public void setLogger(Logger logger)
startback to summary
public abstract void start(Properties ctx) throws Exception

Starts the main entry point using this platform implementation.

Parameters
ctx:Properties

Context in which this object executes. It contains arguments passed to the program as well.

Exceptions
Exception:
if anything goes wrong