Class GrpcEmbeddedServer

java.lang.Object
io.micronaut.grpc.server.GrpcEmbeddedServer
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 @Secondary @Named("grpc.server") @Requires(classes={io.grpc.ServerBuilder.class,io.micronaut.discovery.ServiceInstance.class}) @Requires(property="grpc.server.enabled",value="true",defaultValue="true") public class GrpcEmbeddedServer extends Object implements io.micronaut.runtime.server.EmbeddedServer
Implementation of the EmbeddedServer interface for GRPC.
Since:
1.0
Author:
graemerocher
  • Method Details

    • getServer

      @NonNull public @NonNull io.grpc.Server getServer()
      Returns:
      The underlying GRPC Server.
    • getServerConfiguration

      @NonNull public @NonNull GrpcServerConfiguration getServerConfiguration()
      Returns:
      The configuration for the server
    • 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
    • isServer

      public boolean isServer()
      Specified by:
      isServer in interface io.micronaut.runtime.EmbeddedApplication<io.micronaut.runtime.server.EmbeddedServer>
      Specified by:
      isServer in interface io.micronaut.runtime.server.EmbeddedServer
    • getURI

      public URI getURI()
      Specified by:
      getURI in interface io.micronaut.runtime.server.EmbeddedServer
    • 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
    • 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
    • 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