Class SteamConfigurationBuilder
- java.lang.Object
-
- in.dragonbra.javasteam.steam.steamclient.configuration.SteamConfigurationBuilder
-
- All Implemented Interfaces:
ISteamConfigurationBuilder
public class SteamConfigurationBuilder extends java.lang.Object implements ISteamConfigurationBuilder
- Since:
- 2018-02-20
-
-
Constructor Summary
Constructors Constructor Description SteamConfigurationBuilder()
-
Method Summary
-
-
-
Method Detail
-
createDefaultState
public static SteamConfigurationState createDefaultState()
-
build
public SteamConfiguration build()
-
withCellID
public ISteamConfigurationBuilder withCellID(int cellID)
Description copied from interface:ISteamConfigurationBuilderConfigures thisSteamConfigurationfor a particular Steam cell.- Specified by:
withCellIDin interfaceISteamConfigurationBuilder- Parameters:
cellID- The Steam Cell ID to prioritize when connecting.- Returns:
- A builder with modified configuration.
-
withConnectionTimeout
public ISteamConfigurationBuilder withConnectionTimeout(long connectionTimeout)
Description copied from interface:ISteamConfigurationBuilderConfigures thisSteamConfigurationwith a connection timeout.- Specified by:
withConnectionTimeoutin interfaceISteamConfigurationBuilder- Parameters:
connectionTimeout- The connection timeout used when connecting to Steam serves.- Returns:
- A builder with modified configuration.
-
withHttpClient
public ISteamConfigurationBuilder withHttpClient(okhttp3.OkHttpClient httpClient)
Description copied from interface:ISteamConfigurationBuilderConfigures thisSteamConfigurationwith custom HTTP behaviour.- Specified by:
withHttpClientin interfaceISteamConfigurationBuilder- Parameters:
httpClient- the http client- Returns:
- A builder with modified configuration.
-
withDefaultPersonaStateFlags
public ISteamConfigurationBuilder withDefaultPersonaStateFlags(java.util.EnumSet<EClientPersonaStateFlag> personaStateFlags)
Description copied from interface:ISteamConfigurationBuilderConfigures thisSteamConfigurationwith the defaultEClientPersonaStateFlags to request from Steam.- Specified by:
withDefaultPersonaStateFlagsin interfaceISteamConfigurationBuilder- Parameters:
personaStateFlags- The default persona state flags used when requesting information for a new friend, or when calling SteamFriends.RequestFriendInfo without specifying flags.- Returns:
- A builder with modified configuration.
-
withDefaultPersonaStateFlags
public ISteamConfigurationBuilder withDefaultPersonaStateFlags(EClientPersonaStateFlag personaStateFlags)
Description copied from interface:ISteamConfigurationBuilderConfigures thisSteamConfigurationwith the defaultEClientPersonaStateFlags to request from Steam.- Specified by:
withDefaultPersonaStateFlagsin interfaceISteamConfigurationBuilder- Parameters:
personaStateFlags- The default persona state flags used when requesting information for a new friend, or when calling SteamFriends.RequestFriendInfo without specifying flags.- Returns:
- A builder with modified configuration.
-
withDirectoryFetch
public ISteamConfigurationBuilder withDirectoryFetch(boolean allowDirectoryFetch)
Description copied from interface:ISteamConfigurationBuilderConfigures thisSteamConfigurationto discover available servers.- Specified by:
withDirectoryFetchin interfaceISteamConfigurationBuilder- Parameters:
allowDirectoryFetch- Whether or not to use the Steam Directory to discover available servers.- Returns:
- A builder with modified configuration.
-
withProtocolTypes
public ISteamConfigurationBuilder withProtocolTypes(java.util.EnumSet<ProtocolTypes> protocolTypes)
Description copied from interface:ISteamConfigurationBuilderConfigures how thisSteamConfigurationwill be used to connect to Steam.- Specified by:
withProtocolTypesin interfaceISteamConfigurationBuilder- Parameters:
protocolTypes- The supported protocol types to use when attempting to connect to Steam.- Returns:
- A builder with modified configuration.
-
withProtocolTypes
public ISteamConfigurationBuilder withProtocolTypes(ProtocolTypes protocolTypes)
Description copied from interface:ISteamConfigurationBuilderConfigures how thisSteamConfigurationwill be used to connect to Steam.- Specified by:
withProtocolTypesin interfaceISteamConfigurationBuilder- Parameters:
protocolTypes- The supported protocol types to use when attempting to connect to Steam.- Returns:
- A builder with modified configuration.
-
withServerListProvider
public ISteamConfigurationBuilder withServerListProvider(IServerListProvider provider)
Description copied from interface:ISteamConfigurationBuilderConfigures the server list provider for thisSteamConfiguration.- Specified by:
withServerListProviderin interfaceISteamConfigurationBuilder- Parameters:
provider- The server list provider to use..- Returns:
- A builder with modified configuration.
-
withUniverse
public ISteamConfigurationBuilder withUniverse(EUniverse universe)
Description copied from interface:ISteamConfigurationBuilderConfigures the Universe that thisSteamConfigurationbelongs to.- Specified by:
withUniversein interfaceISteamConfigurationBuilder- Parameters:
universe- The Universe to connect to. This should always beEUniverse.Publicunless you work at Valve and are using this internally. If this is you, hello there.- Returns:
- A builder with modified configuration.
-
withWebAPIBaseAddress
public ISteamConfigurationBuilder withWebAPIBaseAddress(java.lang.String baseAddress)
Description copied from interface:ISteamConfigurationBuilderConfigures the Steam Web API address for thisSteamConfiguration.- Specified by:
withWebAPIBaseAddressin interfaceISteamConfigurationBuilder- Parameters:
baseAddress- The base address of the Steam Web API to connect to. Use of "partner.steam-api.com" requires a Partner API Key.- Returns:
- A builder with modified configuration.
-
withWebAPIKey
public ISteamConfigurationBuilder withWebAPIKey(java.lang.String webApiKey)
Description copied from interface:ISteamConfigurationBuilderConfigures thisSteamConfigurationwith a Web API key to attach to requests.- Specified by:
withWebAPIKeyin interfaceISteamConfigurationBuilder- Parameters:
webApiKey- An API key to be used for authorized requests. Keys can be obtained from Steam Web API Documentation or the Steamworks Partner site.- Returns:
- A builder with modified configuration.
-
-