Class NettyEmbeddedServerResource

java.lang.Object
io.micronaut.crac.resources.NettyEmbeddedServerResource
All Implemented Interfaces:
io.micronaut.core.order.Ordered, OrderedResource, org.crac.Resource

@EachBean(io.micronaut.http.server.netty.NettyEmbeddedServer.class) @Requires(classes=io.micronaut.http.server.netty.NettyEmbeddedServer.class) @Requires(bean=CracResourceRegistrar.class) public class NettyEmbeddedServerResource extends Object implements OrderedResource
Register the NettyEmbedded server as a CRaC resource on startup if CRaC is enabled.
Since:
1.0.0
Author:
Tim Yates
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The default order for this resource.

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
    NettyEmbeddedServerResource(CracEventPublisher eventPublisher, io.micronaut.http.server.netty.NettyEmbeddedServer server)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    afterRestore(org.crac.Context<? extends org.crac.Resource> context)
     
    void
    beforeCheckpoint(org.crac.Context<? extends org.crac.Resource> context)
     
    int
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ORDER

      public static final int ORDER
      The default order for this resource.
      See Also:
  • Constructor Details

    • NettyEmbeddedServerResource

      public NettyEmbeddedServerResource(CracEventPublisher eventPublisher, io.micronaut.http.server.netty.NettyEmbeddedServer server)
  • Method Details

    • beforeCheckpoint

      public void beforeCheckpoint(org.crac.Context<? extends org.crac.Resource> context) throws Exception
      Specified by:
      beforeCheckpoint in interface org.crac.Resource
      Throws:
      Exception
    • afterRestore

      public void afterRestore(org.crac.Context<? extends org.crac.Resource> context) throws Exception
      Specified by:
      afterRestore in interface org.crac.Resource
      Throws:
      Exception
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface io.micronaut.core.order.Ordered