Class InvokerHttpServer

java.lang.Object
io.micronaut.gcp.function.http.test.InvokerHttpServer
All Implemented Interfaces:
io.micronaut.context.ApplicationContextLifeCycle<io.micronaut.runtime.server.EmbeddedServer>, io.micronaut.context.ApplicationContextProvider, io.micronaut.context.LifeCycle, io.micronaut.runtime.EmbeddedApplication<io.micronaut.runtime.server.EmbeddedServer>, io.micronaut.runtime.server.EmbeddedServer, Closeable, AutoCloseable

@Singleton @Internal public class InvokerHttpServer extends Object implements io.micronaut.runtime.server.EmbeddedServer
An embedded server implementation that uses the function invoker. Only for testing purposes.
Since:
3.0.2
Author:
gkrocher
  • Constructor Summary

    Constructors
    Constructor
    Description
    InvokerHttpServer(io.micronaut.context.ApplicationContext applicationContext, io.micronaut.http.server.HttpServerConfiguration httpServerConfiguration)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.micronaut.runtime.ApplicationConfiguration
     
    io.micronaut.context.ApplicationContext
     
    protected Class<?>
    The function class.
     
    int
     
     
     
     
    boolean
     
    io.micronaut.runtime.server.EmbeddedServer
     
    io.micronaut.runtime.server.EmbeddedServer
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.micronaut.runtime.EmbeddedApplication

    getEnvironment, isForceExit

    Methods inherited from interface io.micronaut.runtime.server.EmbeddedServer

    getContextURI, isKeepAlive, isServer

    Methods inherited from interface io.micronaut.context.LifeCycle

    close, refresh
  • Constructor Details

    • InvokerHttpServer

      public InvokerHttpServer(io.micronaut.context.ApplicationContext applicationContext, io.micronaut.http.server.HttpServerConfiguration httpServerConfiguration)
  • Method Details

    • start

      public io.micronaut.runtime.server.EmbeddedServer start()
      Specified by:
      start in interface io.micronaut.context.ApplicationContextLifeCycle<io.micronaut.runtime.server.EmbeddedServer>
      Specified by:
      start in interface io.micronaut.context.LifeCycle
    • getFunctionClass

      protected Class<?> getFunctionClass()
      The function class.
      Returns:
      The function class
    • stop

      public io.micronaut.runtime.server.EmbeddedServer stop()
      Specified by:
      stop in interface io.micronaut.context.ApplicationContextLifeCycle<io.micronaut.runtime.server.EmbeddedServer>
      Specified by:
      stop in interface io.micronaut.context.LifeCycle
    • getPort

      public int getPort()
      Specified by:
      getPort in interface io.micronaut.runtime.server.EmbeddedServer
    • getHost

      public String getHost()
      Specified by:
      getHost in interface io.micronaut.runtime.server.EmbeddedServer
    • getScheme

      public String getScheme()
      Specified by:
      getScheme in interface io.micronaut.runtime.server.EmbeddedServer
    • getURL

      public URL getURL()
      Specified by:
      getURL in interface io.micronaut.runtime.server.EmbeddedServer
    • getURI

      public URI getURI()
      Specified by:
      getURI in interface io.micronaut.runtime.server.EmbeddedServer
    • getApplicationContext

      public io.micronaut.context.ApplicationContext getApplicationContext()
      Specified by:
      getApplicationContext in interface io.micronaut.context.ApplicationContextProvider
      Specified by:
      getApplicationContext in interface io.micronaut.runtime.EmbeddedApplication<io.micronaut.runtime.server.EmbeddedServer>
    • getApplicationConfiguration

      public io.micronaut.runtime.ApplicationConfiguration getApplicationConfiguration()
      Specified by:
      getApplicationConfiguration in interface io.micronaut.runtime.EmbeddedApplication<io.micronaut.runtime.server.EmbeddedServer>
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface io.micronaut.context.LifeCycle