Package org.forgerock.android.auth
Class PushMechanism.PushBuilder
- java.lang.Object
-
- org.forgerock.android.auth.PushMechanism.PushBuilder
-
- Enclosing class:
- PushMechanism
public static class PushMechanism.PushBuilder extends java.lang.ObjectBuilder class responsible for building a Push mechanism.
-
-
Constructor Summary
Constructors Constructor Description PushBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PushMechanismbuild()Produce the described Mechanism.PushMechanism.PushBuildersetAccountName(java.lang.String accountName)Sets the name of the account.PushMechanism.PushBuildersetAuthenticationEndpoint(java.lang.String endpoint)Set the endpoint that will be used for Push authenticationPushMechanism.PushBuildersetIssuer(java.lang.String issuer)Sets the name of the IDP that issued this account.PushMechanism.PushBuildersetMechanismUID(java.lang.String mechanismUID)Sets the mechanism unique Id.PushMechanism.PushBuildersetRegistrationEndpoint(java.lang.String endpoint)Set the endpoint that will be used for Push registration.PushMechanism.PushBuildersetSecret(java.lang.String secret)Set the secret that this mechanism shares with the server.PushMechanism.PushBuildersetTimeAdded(java.util.Calendar timeAdded)Sets the Date and Time this mechanism was stored.
-
-
-
Method Detail
-
setMechanismUID
public PushMechanism.PushBuilder setMechanismUID(java.lang.String mechanismUID)
Sets the mechanism unique Id.- Parameters:
mechanismUID- the mechanism unique Id- Returns:
- The receiving Mechanism.
-
setIssuer
public PushMechanism.PushBuilder setIssuer(java.lang.String issuer)
Sets the name of the IDP that issued this account.- Parameters:
issuer- The IDP name
-
setAccountName
public PushMechanism.PushBuilder setAccountName(java.lang.String accountName)
Sets the name of the account.- Parameters:
accountName- The account name
-
setRegistrationEndpoint
public PushMechanism.PushBuilder setRegistrationEndpoint(java.lang.String endpoint)
Set the endpoint that will be used for Push registration.- Parameters:
endpoint- The endpoint to register the device for Push- Returns:
- This builder
-
setAuthenticationEndpoint
public PushMechanism.PushBuilder setAuthenticationEndpoint(java.lang.String endpoint)
Set the endpoint that will be used for Push authentication- Parameters:
endpoint- The endpoint to respond Push messages to.- Returns:
- This builder
-
setSecret
public PushMechanism.PushBuilder setSecret(java.lang.String secret)
Set the secret that this mechanism shares with the server.- Parameters:
secret- The shared secret- Returns:
- This builder
-
setTimeAdded
public PushMechanism.PushBuilder setTimeAdded(java.util.Calendar timeAdded)
Sets the Date and Time this mechanism was stored.- Parameters:
timeAdded- when this mechanism was stored.
-
build
protected PushMechanism build() throws MechanismCreationException
Produce the described Mechanism.- Returns:
- The built Mechanism
- Throws:
MechanismCreationException- If an issuer or accountName were not provided.
-
-