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
  • Field Details

  • Constructor Details

    • PlatformMain

      public PlatformMain()
  • Method Details

    • 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