Class LifeCycle

java.lang.Object
software.xdev.mockserver.lifecycle.LifeCycle
All Implemented Interfaces:
Closeable, AutoCloseable, Stoppable
Direct Known Subclasses:
MockServer

public abstract class LifeCycle extends Object implements Stoppable
  • Field Details

    • bossGroup

      protected final io.netty.channel.EventLoopGroup bossGroup
    • workerGroup

      protected final io.netty.channel.EventLoopGroup workerGroup
    • httpState

      protected final HttpState httpState
    • serverServerBootstrap

      protected io.netty.bootstrap.ServerBootstrap serverServerBootstrap
  • Constructor Details

  • Method Details

    • stopAsync

      public CompletableFuture<String> stopAsync()
    • stop

      public void stop()
      Specified by:
      stop in interface Stoppable
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • getEventLoopGroup

      protected io.netty.channel.EventLoopGroup getEventLoopGroup()
    • getScheduler

      public Scheduler getScheduler()
    • isRunning

      public boolean isRunning()
    • getLocalPorts

      public List<Integer> getLocalPorts()
    • getLocalPort

      public int getLocalPort()
    • bindServerPorts

      public List<Integer> bindServerPorts(List<Integer> requestedPortBindings)
    • startedServer

      protected void startedServer(List<Integer> ports)
    • registerListener

      public LifeCycle registerListener(ExpectationsListener expectationsListener)