public class ConnectionConfig extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ConnectionConfig.CloseIdleConnectionConfig
Close open connections that have idled for the amount of time specified in this config.
|
| Constructor and Description |
|---|
ConnectionConfig()
Create a new connection configuration that doesn't close the HTTP connections after each response.
|
ConnectionConfig(ConnectionConfig.CloseIdleConnectionConfig closeIdleConnectionConfig)
Create a new Connection configuration with the supplied settings.
|
| Modifier and Type | Method and Description |
|---|---|
ConnectionConfig |
and()
Syntactic sugar.
|
ConnectionConfig.CloseIdleConnectionConfig |
closeIdleConnectionConfig() |
ConnectionConfig |
closeIdleConnectionsAfterEachResponse()
Close open connections after each response.
|
ConnectionConfig |
closeIdleConnectionsAfterEachResponseAfter(ConnectionConfig.CloseIdleConnectionConfig closeIdleConnectionConfig)
Close open connections that have idled for the amount of time specified in this config after each response.
|
ConnectionConfig |
closeIdleConnectionsAfterEachResponseAfter(long idleTime,
TimeUnit timeUnit)
Close open connections that have idled for the amount of time specified in this config after each response.
|
static ConnectionConfig |
connectionConfig() |
ConnectionConfig |
dontCloseIdleConnectionsAfterEachResponse()
Don't close idle connections after each request.
|
boolean |
shouldCloseIdleConnectionsAfterEachResponse() |
public ConnectionConfig()
public ConnectionConfig(ConnectionConfig.CloseIdleConnectionConfig closeIdleConnectionConfig)
closeIdleConnectionConfig - Configures REST Assured to close idle connections after each response.
If null (default) then connections are not close after each response.public ConnectionConfig closeIdleConnectionsAfterEachResponse()
public ConnectionConfig closeIdleConnectionsAfterEachResponseAfter(long idleTime, TimeUnit timeUnit)
idleTime - The idle time of connections to be closedtimeUnit - The time unit to for idleTimepublic ConnectionConfig closeIdleConnectionsAfterEachResponseAfter(ConnectionConfig.CloseIdleConnectionConfig closeIdleConnectionConfig)
closeIdleConnectionConfig - The close connection configuration.public ConnectionConfig dontCloseIdleConnectionsAfterEachResponse()
public ConnectionConfig.CloseIdleConnectionConfig closeIdleConnectionConfig()
public boolean shouldCloseIdleConnectionsAfterEachResponse()
public static ConnectionConfig connectionConfig()
public ConnectionConfig and()
Copyright © 2010–2014. All rights reserved.