Class JavaMailContainer

java.lang.Object
org.apache.ofbiz.service.mail.JavaMailContainer
All Implemented Interfaces:
Container

public class JavaMailContainer extends Object implements Container
  • Field Details

  • Constructor Details

    • JavaMailContainer

      public JavaMailContainer()
  • Method Details

    • init

      public void init(List<StartupCommand> ofbizCommands, String name, String configFile)
      Description copied from interface: Container
      Initialize the container. This method must not block - implementations should initialize internal structures and then return.
      Specified by:
      init in interface Container
      Parameters:
      ofbizCommands - Command-line arguments.
      name - Unique name of the container's instance.
      configFile - always null but used to be the location of the global container configuration file which does not exist anymore
    • start

      public boolean start() throws ContainerException
      Description copied from interface: Container
      Start the container process. This method must not block - implementations that require thread blocking must create a separate thread and then return.
      Specified by:
      start in interface Container
      Returns:
      true if the process started.
      Throws:
      ContainerException - If an error was encountered.
    • stop

      public void stop()
      Description copied from interface: Container
      Stop the container process. This method must not block.
      Specified by:
      stop in interface Container
    • getName

      public String getName()
      Description copied from interface: Container
      Return the container name.
      Specified by:
      getName in interface Container
      Returns:
      Name of the container's instance.
    • makeSession

      protected javax.mail.Session makeSession(ContainerConfig.Configuration.Property client)
      Make session session.
      Parameters:
      client - the client
      Returns:
      the session
    • getStore

      protected javax.mail.Store getStore(javax.mail.Session session) throws ContainerException
      Gets store.
      Parameters:
      session - the session
      Returns:
      the store
      Throws:
      ContainerException - the container exception
    • updateUrlName

      protected javax.mail.URLName updateUrlName(javax.mail.URLName urlName, Properties props)
      Update url name url name.
      Parameters:
      urlName - the url name
      props - the props
      Returns:
      the url name