IkeSaProposal.Builder
public
static
final
class
IkeSaProposal.Builder
extends Object
| java.lang.Object | |
| ↳ | android.net.ipsec.ike.IkeSaProposal.Builder |
This class is used to incrementally construct a IkeSaProposal. IkeSaProposal instances are immutable once built.
Summary
Public constructors | |
|---|---|
Builder()
|
|
Public methods | |
|---|---|
IkeSaProposal.Builder
|
addDhGroup(int dhGroup)
Adds a Diffie-Hellman Group to the SA proposal being built. |
IkeSaProposal.Builder
|
addEncryptionAlgorithm(int algorithm, int keyLength)
Adds an encryption algorithm with a specific key length to the SA proposal being built. |
IkeSaProposal.Builder
|
addIntegrityAlgorithm(int algorithm)
Adds an integrity algorithm to the SA proposal being built. |
IkeSaProposal.Builder
|
addPseudorandomFunction(int algorithm)
Adds a pseudorandom function to the SA proposal being built. |
IkeSaProposal
|
build()
Validates and builds the IkeSaProposal. |
Inherited methods | |
|---|---|
Public constructors
Public methods
addDhGroup
public IkeSaProposal.Builder addDhGroup (int dhGroup)
Adds a Diffie-Hellman Group to the SA proposal being built.
| Parameters | |
|---|---|
dhGroup |
int: to add to IkeSaProposal.
Value is one of the following: |
| Returns | |
|---|---|
IkeSaProposal.Builder |
Builder of IkeSaProposal.
This value cannot be null. |
addEncryptionAlgorithm
public IkeSaProposal.Builder addEncryptionAlgorithm (int algorithm, int keyLength)
Adds an encryption algorithm with a specific key length to the SA proposal being built.
| Parameters | |
|---|---|
algorithm |
int: encryption algorithm to add to IkeSaProposal.
Value is one of the following: |
keyLength |
int: key length of algorithm. For algorithms that have fixed key length (e.g.
3DES) only SaProposal.KEY_LEN_UNUSED is allowed. |
| Returns | |
|---|---|
IkeSaProposal.Builder |
Builder of IkeSaProposal.
This value cannot be null. |
addIntegrityAlgorithm
public IkeSaProposal.Builder addIntegrityAlgorithm (int algorithm)
Adds an integrity algorithm to the SA proposal being built.
| Parameters | |
|---|---|
algorithm |
int: integrity algorithm to add to IkeSaProposal.
Value is one of the following:
|
| Returns | |
|---|---|
IkeSaProposal.Builder |
Builder of IkeSaProposal.
This value cannot be null. |
addPseudorandomFunction
public IkeSaProposal.Builder addPseudorandomFunction (int algorithm)
Adds a pseudorandom function to the SA proposal being built.
| Parameters | |
|---|---|
algorithm |
int: pseudorandom function to add to IkeSaProposal.
Value is one of the following: |
| Returns | |
|---|---|
IkeSaProposal.Builder |
Builder of IkeSaProposal.
This value cannot be null. |
build
public IkeSaProposal build ()
Validates and builds the IkeSaProposal.
| Returns | |
|---|---|
IkeSaProposal |
the validated IkeSaProposal.
This value cannot be null. |