public abstract class MocoServerConfig extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MocoServerConfig.Builder
Builds a
MocoServerConfig instance |
Modifier | Constructor and Description |
---|---|
protected |
MocoServerConfig()
Creates a new MocoServerConfig instance.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
accept(ConfigVisitor visitor)
Implements the Visitor pattern for this server configuration.
|
static MocoServerConfig.Builder |
file(File file)
Creates a new Builder for a MocoServerConfigFile instance.
|
static MocoServerConfig.Builder |
file(String file)
Creates a new Builder for a MocoServerConfigFile instance.
|
String |
getName()
Returns the variable name used to reference the Moco server.
|
Integer |
getPort()
Returns the local port used by the Moco server to listen for requests.
|
String |
getRuleType()
Returns the JUnit TestRule type for this server configuration.
|
boolean |
isEachTest()
Returns if the Moco server is restarted for each @Test method (true) or only once for each test class.
|
static MocoServerConfig.Builder |
pojo()
Creates a new Builder for a MocoServerConfigPojo instance.
|
static MocoServerConfig.Builder |
pojo(MocoServerConfigPojo.PojoWriter writer)
Creates a new Builder for a MocoServerConfigPojo instance.
|
static MocoServerConfig.Builder |
pojo(MocoServerConfigPojo.PojoWriterFactory factory)
Creates a new Builder for a MocoServerConfigPojo instance.
|
static MocoServerConfig.Builder |
pojo(String factoryClass)
Creates a new Builder for a MocoServerConfigPojo instance.
|
static MocoServerConfig.Builder |
resource(String resource)
Creates a new Builder for a MocoServerConfigResource instance.
|
void |
setEachTest(boolean eachTest)
Changes if the Moco server is restarted for each @Test method (true) or only once for each test class.
|
void |
setName(String name)
Changes the variable name used to reference the Moco server.
|
void |
setPort(Integer port)
Changes the local port used by the Moco server to listen for requests.
|
String |
toString() |
protected MocoServerConfig()
public void setPort(Integer port)
public Integer getPort()
public void setName(String name)
public String getName()
public void setEachTest(boolean eachTest)
public boolean isEachTest()
public String getRuleType()
public abstract void accept(ConfigVisitor visitor)
public static MocoServerConfig.Builder file(File file)
public static MocoServerConfig.Builder file(String file)
public static MocoServerConfig.Builder resource(String resource)
public static MocoServerConfig.Builder pojo()
public static MocoServerConfig.Builder pojo(MocoServerConfigPojo.PojoWriter writer)
public static MocoServerConfig.Builder pojo(MocoServerConfigPojo.PojoWriterFactory factory)
public static MocoServerConfig.Builder pojo(String factoryClass)
Copyright © 2024 The Cornutum Project. All rights reserved.