Package org.mockserver.lifecycle
Class LifeCycle
- java.lang.Object
-
- org.mockserver.lifecycle.LifeCycle
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Stoppable
- Direct Known Subclasses:
MockServer
public abstract class LifeCycle extends Object implements Stoppable
- Author:
- jamesdbloom
-
-
Field Summary
Fields Modifier and Type Field Description protected io.netty.channel.EventLoopGroupbossGroupprotected HttpStateHandlerhttpStateHandlerprotected MockServerLoggermockServerLoggerprotected io.netty.bootstrap.ServerBootstrapserverServerBootstrapprotected io.netty.channel.EventLoopGroupworkerGroup
-
Constructor Summary
Constructors Modifier Constructor Description protectedLifeCycle()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<Integer>bindServerPorts(List<Integer> requestedPortBindings)voidclose()protected io.netty.channel.EventLoopGroupgetEventLoopGroup()intgetLocalPort()List<Integer>getLocalPorts()IntegergetPort()Deprecated.use getLocalPort instead of getPortSchedulergetScheduler()booleanisRunning()protected voidstartedServer(List<Integer> ports)voidstop()FuturestopAsync()
-
-
-
Field Detail
-
mockServerLogger
protected final MockServerLogger mockServerLogger
-
bossGroup
protected io.netty.channel.EventLoopGroup bossGroup
-
workerGroup
protected io.netty.channel.EventLoopGroup workerGroup
-
httpStateHandler
protected HttpStateHandler httpStateHandler
-
serverServerBootstrap
protected io.netty.bootstrap.ServerBootstrap serverServerBootstrap
-
-
Method Detail
-
stopAsync
public Future stopAsync()
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
getEventLoopGroup
protected io.netty.channel.EventLoopGroup getEventLoopGroup()
-
getScheduler
public Scheduler getScheduler()
-
isRunning
public boolean isRunning()
-
getPort
@Deprecated public Integer getPort()
Deprecated.use getLocalPort instead of getPort
-
getLocalPort
public int getLocalPort()
-
-