Class TestServerBuilder

java.lang.Object
test.de.iip_ecosphere.platform.transport.TestServerBuilder
All Implemented Interfaces:
de.iip_ecosphere.platform.support.Builder<AbstractTestServer>

public class TestServerBuilder extends Object implements de.iip_ecosphere.platform.support.Builder<AbstractTestServer>
A builder for delayed building of test server plugin server instances.
Author:
Holger Eichelberger, SSE
  • Field Details

  • Constructor Details

    • TestServerBuilder

      public TestServerBuilder(String id, TestServerBuilder.InstanceCreator instanceCreator, File installDir)
      Creates a builder instance.
      Parameters:
      id - the plugin id
      instanceCreator - the server instance creator
      installDir - the plugin installation directory, may be null
  • Method Details

    • setAddress

      public TestServerBuilder setAddress(de.iip_ecosphere.platform.support.ServerAddress addr)
      Sets the server address.
      Parameters:
      addr - the server address (schema ignored)
    • build

      public AbstractTestServer build()
      Specified by:
      build in interface de.iip_ecosphere.platform.support.Builder<AbstractTestServer>
    • fromPlugin

      public static TestServerBuilder fromPlugin(String pluginId)
      Creates a builder from the given plugin id via the PluginManager.
      Parameters:
      pluginId - the plugin id
      Returns:
      the test server builder
      Throws:
      NullPointerException - if no such plugin exists
    • fromPlugin

      public static AbstractTestServer fromPlugin(String pluginId, de.iip_ecosphere.platform.support.ServerAddress address)
      Creates a test server instance from the given plugin id via the PluginManager via the TestServerBuilder.
      Parameters:
      pluginId - the plugin id
      Returns:
      the test server builder
      Throws:
      NullPointerException - if no such plugin exists