Class Configuration

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 class  Configuration.Builder
    Build a configuration object that will be used ton instantiate a Rest client.
  • Method Summary

    Modifier and Type Method Description
    java.net.URL getHost()
    Holds the host URL provided at the creation of the builder.
    java.lang.String getPassword()
    Holds the password provided at the creation of the builder.
    java.net.Proxy getProxy()
    Holds the Proxy provided at the creation of the builder.
    java.lang.String getUsername()
    Holds the username provided at the creation of the builder.
    ParkingAccess toRestClient()
    Create a new ParkingAccess Rest client.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

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