Class APN.Builder

Object
Builder
Enclosing class:
APN

public static final class APN.Builder
extends Object
Provides a convenient way to set the fields of a APN object when creating a new instance, following the Builder pattern. The following setting is required to build a APN object:
  • name

The example below shows how you might create a new APN object instance:


 // Create a APN object instance with the name "TEST" for use with the german "Vodafone" network
 APN apn = APN.setName("TEST")
       .setApn("web.vodafone.de")
       .setAuthType(APN.AUTH_TYPE_NONE)
       .build();
 
Since:
1.00
  • Method Details

    • build

      public APN build()
      This method is used to finally instantiate an APN object from this Builder, after all optional chaining has been done.
      Returns:
      APN: instance object created from Builder pattern.
      Since:
      1.00
    • setApn

      public APN.Builder setApn​(String apn)
      Sets the APN name of the Access Point Name (APN) configuration, using Builder pattern method chaining.
      Parameters:
      apn - String: The APN name of the Access Point Name (APN) configuration.
      Returns:
      The instance object of this Builder, with a mandatory String name set, and an APN name provided.
      Since:
      1.00
    • setAuthType

      public APN.Builder setAuthType​(int authType)
      Sets the Authentication Type of the Access Point Name (APN) configuration, using Builder pattern method chaining.
      Parameters:
      authType - int: The Authentication Type of the Access Point Name (APN) configuration.
      Returns:
      The instance object of this Builder, with a mandatory String name set, and an Authentication Type provided.
      Since:
      1.00
    • setCurrent

      public APN.Builder setCurrent​(String current)
      Sets the APN currently being in use of the Access Point Name (APN) configuration, using Builder pattern method chaining.
      Parameters:
      current - String: The APN currently being in use of the Access Point Name (APN) configuration.
      Returns:
      The instance object of this Builder, with a mandatory String name set, and an APN currently being in use provided.
      Since:
      1.00
    • setId

      public APN.Builder setId​(int id)
      Sets the ID of the Access Point Name (APN) configuration, using Builder pattern method chaining.
      Parameters:
      id - int: The ID of the Access Point Name (APN) configuration.
      Returns:
      The instance object of this Builder, with a mandatory String name set, and an ID provided.
      Since:
      1.00
    • setMcc

      public APN.Builder setMcc​(String mcc)
      Sets the Mobile Country Code of the Access Point Name (APN) configuration, using Builder pattern method chaining.
      Parameters:
      mcc - String: The Mobile Country Code of the Access Point Name (APN) configuration.
      Returns:
      The instance object of this Builder, with a mandatory String name set, and a Mobile Country Code provided.
      Since:
      1.00
    • setMmsPort

      public APN.Builder setMmsPort​(String mmsPort)
      Sets the MMS Proxy Port of the Access Point Name (APN) configuration, using Builder pattern method chaining.
      Parameters:
      mmsPort - String: The MMS Proxy Port of the Access Point Name (APN) configuration.
      Returns:
      The instance object of this Builder, with a mandatory String name set, and an MMS Proxy Port provided.
      Since:
      1.00
    • setMmsProxy

      public APN.Builder setMmsProxy​(String mmsProxy)
      Sets the MMS Proxy URL of the Access Point Name (APN) configuration, using Builder pattern method chaining.
      Parameters:
      mmsProxy - String: The MMS Proxy URL of the Access Point Name (APN) configuration.
      Returns:
      The instance object of this Builder, with a mandatory String name set, and an MMS Proxy URL provided.
      Since:
      1.00
    • setMmsc

      public APN.Builder setMmsc​(String mmsc)
      Sets the MMSC (Multimedia Messaging Service Center) of the Access Point Name (APN) configuration, using Builder pattern method chaining.
      Parameters:
      mmsc - String: The MMSC (Multimedia Messaging Service Center) of the Access Point Name (APN) configuration.
      Returns:
      The instance object of this Builder, with a mandatory String name set, and an MMSC (Multimedia Messaging Service Center) provided.
      Since:
      1.00
    • setMnc

      public APN.Builder setMnc​(String mnc)
      Sets the Mobile Network Code of the Access Point Name (APN) configuration, using Builder pattern method chaining.
      Parameters:
      mnc - String: The Mobile Network Code of the Access Point Name (APN) configuration.
      Returns:
      The instance object of this Builder, with a mandatory String name set, and a Mobile Network Code provided.
      Since:
      1.00
    • setPassword

      public APN.Builder setPassword​(String password)
      Sets the APN password of the Access Point Name (APN) configuration, using Builder pattern method chaining.
      Parameters:
      password - String: The APN password of the Access Point Name (APN) configuration.
      Returns:
      The instance object of this Builder, with a mandatory String name set, and an APN password provided.
      Since:
      1.00
    • setPort

      public APN.Builder setPort​(String port)
      Sets the Server's Port of the Access Point Name (APN) configuration, using Builder pattern method chaining.
      Parameters:
      port - String: The Server's Port of the Access Point Name (APN) configuration.
      Returns:
      The instance object of this Builder, with a mandatory String name set, and a Server's Port provided.
      Since:
      1.00
    • setProxy

      public APN.Builder setProxy​(String proxy)
      Sets the Proxy URL of the Access Point Name (APN) configuration, using Builder pattern method chaining.
      Parameters:
      proxy - String: The Proxy URL of the Access Point Name (APN) configuration.
      Returns:
      The instance object of this Builder, with a mandatory String name set, and a Proxy URL provided.
      Since:
      1.00
    • setServer

      public APN.Builder setServer​(String server)
      Sets the APN Server of the Access Point Name (APN) configuration, using Builder pattern method chaining.
      Parameters:
      server - String: The APN Server of the Access Point Name (APN) configuration.
      Returns:
      The instance object of this Builder, with a mandatory String name set, and an APN Server provided.
      Since:
      1.00
    • setType

      public APN.Builder setType​(String type)
      Sets the Type of the Access Point Name (APN) configuration, using Builder pattern method chaining.
      Parameters:
      type - String: The Type of the Access Point Name (APN) configuration.
      Returns:
      The instance object of this Builder, with a mandatory String name set, and a Type provided.
      Since:
      1.00
    • setUser

      public APN.Builder setUser​(String user)
      Sets the Username of the Access Point Name (APN) configuration, using Builder pattern method chaining.
      Parameters:
      user - String: The Username of the Access Point Name (APN) configuration.
      Returns:
      The instance object of this Builder, with a mandatory String name set, and a Username provided.
      Since:
      1.00