Package top.focess.util.network
Class NetworkHandler.Options
- java.lang.Object
-
- top.focess.util.network.NetworkHandler.Options
-
- Enclosing class:
- NetworkHandler
public static class NetworkHandler.Options extends Object
NetworkHandler Options
-
-
Constructor Summary
Constructors Constructor Description Options()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NetworkHandler.OptionsofConnectTimeout(int connectTimeout)Set the connecting timeoutstatic NetworkHandler.OptionsofNull()Use the default optionsstatic NetworkHandler.OptionsofReadTimeout(int readTimeout)Set the reading timeoutstatic NetworkHandler.OptionsofWriteTimeout(int writeTimeout)Set the writing timeoutNetworkHandler.OptionssetConnectTimeout(int connectTimeout)Set the connecting timeoutNetworkHandler.OptionssetReadTimeout(int readTimeout)Set the reading timeoutNetworkHandler.OptionssetWriteTimeout(int writeTimeout)Set the writing timeout
-
-
-
Method Detail
-
ofConnectTimeout
public static NetworkHandler.Options ofConnectTimeout(int connectTimeout)
Set the connecting timeout- Parameters:
connectTimeout- the connecting timeout- Returns:
- the configured options
-
ofWriteTimeout
public static NetworkHandler.Options ofWriteTimeout(int writeTimeout)
Set the writing timeout- Parameters:
writeTimeout- the writing timeout- Returns:
- the configured options
-
ofReadTimeout
public static NetworkHandler.Options ofReadTimeout(int readTimeout)
Set the reading timeout- Parameters:
readTimeout- the reading timeout- Returns:
- the configured options
-
ofNull
public static NetworkHandler.Options ofNull()
Use the default options- Returns:
- the default options
-
setConnectTimeout
public NetworkHandler.Options setConnectTimeout(int connectTimeout)
Set the connecting timeout- Parameters:
connectTimeout- the connecting timeout- Returns:
- itself
-
setReadTimeout
public NetworkHandler.Options setReadTimeout(int readTimeout)
Set the reading timeout- Parameters:
readTimeout- the reading timeout- Returns:
- itself
-
setWriteTimeout
public NetworkHandler.Options setWriteTimeout(int writeTimeout)
Set the writing timeout- Parameters:
writeTimeout- the writing timeout- Returns:
- itself
-
-