Class ApnsCredential


  • public final class ApnsCredential
    extends Object
    Description of a NotificationHub ApnsCredential.
    • Constructor Detail

      • ApnsCredential

        public ApnsCredential()
    • Method Detail

      • apnsCertificate

        public String apnsCertificate()
        Get the apnsCertificate property: The APNS certificate. Specify if using Certificate Authentication Mode.
        Returns:
        the apnsCertificate value.
      • withApnsCertificate

        public ApnsCredential withApnsCertificate​(String apnsCertificate)
        Set the apnsCertificate property: The APNS certificate. Specify if using Certificate Authentication Mode.
        Parameters:
        apnsCertificate - the apnsCertificate value to set.
        Returns:
        the ApnsCredential object itself.
      • certificateKey

        public String certificateKey()
        Get the certificateKey property: The APNS certificate password if it exists.
        Returns:
        the certificateKey value.
      • withCertificateKey

        public ApnsCredential withCertificateKey​(String certificateKey)
        Set the certificateKey property: The APNS certificate password if it exists.
        Parameters:
        certificateKey - the certificateKey value to set.
        Returns:
        the ApnsCredential object itself.
      • endpoint

        public String endpoint()
        Get the endpoint property: The APNS endpoint of this credential. If using Certificate Authentication Mode and Sandbox specify 'gateway.sandbox.push.apple.com'. If using Certificate Authentication Mode and Production specify 'gateway.push.apple.com'. If using Token Authentication Mode and Sandbox specify 'https://api.development.push.apple.com:443/3/device'. If using Token Authentication Mode and Production specify 'https://api.push.apple.com:443/3/device'.
        Returns:
        the endpoint value.
      • withEndpoint

        public ApnsCredential withEndpoint​(String endpoint)
        Set the endpoint property: The APNS endpoint of this credential. If using Certificate Authentication Mode and Sandbox specify 'gateway.sandbox.push.apple.com'. If using Certificate Authentication Mode and Production specify 'gateway.push.apple.com'. If using Token Authentication Mode and Sandbox specify 'https://api.development.push.apple.com:443/3/device'. If using Token Authentication Mode and Production specify 'https://api.push.apple.com:443/3/device'.
        Parameters:
        endpoint - the endpoint value to set.
        Returns:
        the ApnsCredential object itself.
      • thumbprint

        public String thumbprint()
        Get the thumbprint property: The APNS certificate thumbprint. Specify if using Certificate Authentication Mode.
        Returns:
        the thumbprint value.
      • withThumbprint

        public ApnsCredential withThumbprint​(String thumbprint)
        Set the thumbprint property: The APNS certificate thumbprint. Specify if using Certificate Authentication Mode.
        Parameters:
        thumbprint - the thumbprint value to set.
        Returns:
        the ApnsCredential object itself.
      • keyId

        public String keyId()
        Get the keyId property: A 10-character key identifier (kid) key, obtained from your developer account. Specify if using Token Authentication Mode.
        Returns:
        the keyId value.
      • withKeyId

        public ApnsCredential withKeyId​(String keyId)
        Set the keyId property: A 10-character key identifier (kid) key, obtained from your developer account. Specify if using Token Authentication Mode.
        Parameters:
        keyId - the keyId value to set.
        Returns:
        the ApnsCredential object itself.
      • appName

        public String appName()
        Get the appName property: The name of the application or BundleId. Specify if using Token Authentication Mode.
        Returns:
        the appName value.
      • withAppName

        public ApnsCredential withAppName​(String appName)
        Set the appName property: The name of the application or BundleId. Specify if using Token Authentication Mode.
        Parameters:
        appName - the appName value to set.
        Returns:
        the ApnsCredential object itself.
      • appId

        public String appId()
        Get the appId property: The issuer (iss) registered claim key. The value is a 10-character TeamId, obtained from your developer account. Specify if using Token Authentication Mode.
        Returns:
        the appId value.
      • withAppId

        public ApnsCredential withAppId​(String appId)
        Set the appId property: The issuer (iss) registered claim key. The value is a 10-character TeamId, obtained from your developer account. Specify if using Token Authentication Mode.
        Parameters:
        appId - the appId value to set.
        Returns:
        the ApnsCredential object itself.
      • token

        public String token()
        Get the token property: Provider Authentication Token, obtained through your developer account. Specify if using Token Authentication Mode.
        Returns:
        the token value.
      • withToken

        public ApnsCredential withToken​(String token)
        Set the token property: Provider Authentication Token, obtained through your developer account. Specify if using Token Authentication Mode.
        Parameters:
        token - the token value to set.
        Returns:
        the ApnsCredential object itself.
      • validate

        public void validate()
        Validates the instance.
        Throws:
        IllegalArgumentException - thrown if the instance is not valid.