ApnsConfig.Builder

public static class ApnsConfig.Builder extends Object

Public Method Summary

ApnsConfig
build()
Creates a new ApnsConfig instance from the parameters set on this builder.
ApnsConfig.Builder
putAllCustomData(Map<String, Object> map)
Adds all the key-value pairs in the given map as APNS custom data fields.
ApnsConfig.Builder
putAllHeaders(Map<String, String> map)
Adds all the key-value pairs in the given map as APNS headers.
ApnsConfig.Builder
putCustomData(String key, Object value)
Adds the given key-value pair as an APNS custom data field.
ApnsConfig.Builder
putHeader(String key, String value)
Adds the given key-value pair as an APNS header.
ApnsConfig.Builder
setAps(Aps aps)
Sets the aps dictionary of the APNS message.

Inherited Method Summary

Public Methods

public ApnsConfig build ()

Creates a new ApnsConfig instance from the parameters set on this builder.

Returns
Throws
IllegalArgumentException If any of the parameters set on the builder are invalid.

public ApnsConfig.Builder putAllCustomData (Map<String, Object> map)

Adds all the key-value pairs in the given map as APNS custom data fields.

Parameters
map A non-null map. Map must not contain null keys or values.
Returns
  • This builder.

public ApnsConfig.Builder putAllHeaders (Map<String, String> map)

Adds all the key-value pairs in the given map as APNS headers.

Parameters
map A non-null map of headers. Map must not contain null keys or values.
Returns
  • This builder.

public ApnsConfig.Builder putCustomData (String key, Object value)

Adds the given key-value pair as an APNS custom data field.

Parameters
key Name of the data field. Must not be null.
value Value of the data field. Must not be null.
Returns
  • This builder.

public ApnsConfig.Builder putHeader (String key, String value)

Adds the given key-value pair as an APNS header.

Parameters
key Name of the header field. Must not be null.
value Value of the header field. Must not be null.
Returns
  • This builder.

public ApnsConfig.Builder setAps (Aps aps)

Sets the aps dictionary of the APNS message.

Parameters
aps A non-null instance of Aps.
Returns
  • This builder.

Send feedback about...

Need help? Visit our support page.