EapSessionConfig.Builder  |  API reference  |  Android Developers


public static final class EapSessionConfig.Builder
extends Object



This class can be used to incrementally construct an EapSessionConfig.

Summary

Public constructors

Builder()

Constructs and returns a new Builder for constructing an EapSessionConfig.

Public methods

EapSessionConfig build()

Constructs and returns an EapSessionConfig with the configurations applied to this Builder.

EapSessionConfig.Builder setEapAkaConfig(int subId, int apptype, EapSessionConfig.EapAkaOption options)

Sets the configuration for EAP AKA with options.

EapSessionConfig.Builder setEapAkaConfig(int subId, int apptype)

Sets the configuration for EAP AKA.

EapSessionConfig.Builder setEapAkaPrimeConfig(int subId, int apptype, String networkName, boolean allowMismatchedNetworkNames)

Sets the configuration for EAP AKA'.

EapSessionConfig.Builder setEapIdentity(byte[] eapIdentity)

Sets the client's EAP Identity.

EapSessionConfig.Builder setEapMsChapV2Config(String username, String password)

Sets the configuration for EAP MSCHAPv2.

EapSessionConfig.Builder setEapSimConfig(int subId, int apptype)

Sets the configuration for EAP SIM.

EapSessionConfig.Builder setEapTtlsConfig(X509Certificate serverCaCert, EapSessionConfig innerEapSessionConfig)

Sets the configuration for EAP-TTLS.

Inherited methods

From class java.lang.Object

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

public Builder ()

Constructs and returns a new Builder for constructing an EapSessionConfig.

Public methods

build

public EapSessionConfig build ()

Constructs and returns an EapSessionConfig with the configurations applied to this Builder.

Returns
EapSessionConfig the EapSessionConfig constructed by this Builder.
This value cannot be null.

setEapIdentity

public EapSessionConfig.Builder setEapIdentity (byte[] eapIdentity)

Sets the client's EAP Identity.

Parameters
eapIdentity byte: byte[] representing the client's EAP Identity.
This value cannot be null.
Returns
EapSessionConfig.Builder Builder this, to facilitate chaining.
This value cannot be null.

setEapMsChapV2Config

public EapSessionConfig.Builder setEapMsChapV2Config (String username, 
                String password)

Sets the configuration for EAP MSCHAPv2.

Parameters
username String: String the client account's username to be authenticated.
This value cannot be null.
password String: String the client account's password to be authenticated.
This value cannot be null.
Returns
EapSessionConfig.Builder Builder this, to faciliate chaining.
This value cannot be null.

setEapTtlsConfig

public EapSessionConfig.Builder setEapTtlsConfig (X509Certificate serverCaCert, 
                EapSessionConfig innerEapSessionConfig)

Sets the configuration for EAP-TTLS.

Tunneled EAP-TTLS authentications are disallowed, as running multiple layers of EAP-TTLS increases the data footprint but has no discernible benefits over a single EAP-TTLS session with a non EAP-TTLS method nested inside it.

Parameters
serverCaCert X509Certificate: the CA certificate for validating the received server certificate(s). If a certificate is provided, it MUST be the root CA used by the server, or authentication will fail. If no certificate is provided, any root CA in the system's truststore is considered acceptable.
This value may be null.
innerEapSessionConfig EapSessionConfig: represents the configuration for the inner EAP instance.
This value cannot be null.
Returns
EapSessionConfig.Builder Builder this, to facilitate chaining.
This value cannot be null.