Package net.commuty.parking
Class Configuration
java.lang.Object
net.commuty.parking.Configuration
This will be your entry point to use the Rest client.
You need to use the inner Builder class to create a Configuration object,
Then you will be able to instantiate a Rest client via the method toRestClient().
For example, if you want to create a client with only the username and password you were given, use this:
ParkingAccess client = Configuration.Builder.buildDefault("a-username", "a-password").toRestClient();
You will then be able to call methods on the client object.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuild a configuration object that will be used ton instantiate a Rest client.static classstatic class -
Method Summary
Modifier and TypeMethodDescriptiongetHost()Holds the host URL provided at the creation of the builder.Holds the password provided at the creation of the builder.getProxy()Holds the Proxy provided at the creation of the builder.Holds the RetryStrategy provided at the creation of the builder.Holds the Timeout values provided at the creation of the builder.Holds the username provided at the creation of the builder.Create a newParkingAccessRest client.
-
Method Details
-
getUsername
Holds the username provided at the creation of the builder.- Returns:
- the username.
-
getPassword
Holds the password provided at the creation of the builder.- Returns:
- the password.
-
getHost
Holds the host URL provided at the creation of the builder.If no host was provided, this will contain the default production parking api of Commuty.
- Returns:
- the host url the client will use.
-
getProxy
Holds the Proxy provided at the creation of the builder.If no proxy was provided, this will be null.
- Returns:
- The proxy (if any).
-
getRetryStrategy
Holds the RetryStrategy provided at the creation of the builder.- Returns:
- The retry strategy.
-
getTimeout
Holds the Timeout values provided at the creation of the builder.- Returns:
- the timeout
-
toRestClient
Create a newParkingAccessRest client.- Returns:
- the client.
-