java.lang.Object
net.commuty.parking.Configuration
public class Configuration
extends java.lang.Object
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 Classes Modifier and Type Class Description static classConfiguration.BuilderBuild a configuration object that will be used ton instantiate a Rest client. -
Method Summary
Modifier and Type Method Description java.net.URLgetHost()Holds the host URL provided at the creation of the builder.java.lang.StringgetPassword()Holds the password provided at the creation of the builder.java.net.ProxygetProxy()Holds the Proxy provided at the creation of the builder.java.lang.StringgetUsername()Holds the username provided at the creation of the builder.ParkingAccesstoRestClient()Create a newParkingAccessRest client.
-
Method Details
-
getUsername
public java.lang.String getUsername()Holds the username provided at the creation of the builder.- Returns:
- the username.
-
getPassword
public java.lang.String getPassword()Holds the password provided at the creation of the builder.- Returns:
- the password.
-
getHost
public java.net.URL 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
public java.net.Proxy 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).
-
toRestClient
Create a newParkingAccessRest client.- Returns:
- the client.
-