Class Configuration

java.lang.Object
net.commuty.parking.Configuration

public class Configuration extends 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.

  • Method Details

    • getUsername

      public String getUsername()
      Holds the username provided at the creation of the builder.
      Returns:
      the username.
    • getPassword

      public String getPassword()
      Holds the password provided at the creation of the builder.
      Returns:
      the password.
    • getHost

      public 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 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).
    • getRetryStrategy

      public Configuration.RetryStrategy getRetryStrategy()
      Holds the RetryStrategy provided at the creation of the builder.
      Returns:
      The retry strategy.
    • getTimeout

      public Configuration.Timeout getTimeout()
      Holds the Timeout values provided at the creation of the builder.
      Returns:
      the timeout
    • toRestClient

      public ParkingAccess toRestClient()
      Create a new ParkingAccess Rest client.
      Returns:
      the client.