PublishBuilder

Interface representing a builder for configuring a publish operation. This interface extends Endpoint to provide a fluent API for setting various parameters for the publish request.

Functions

Link copied to clipboard
abstract fun async(callback: Consumer<Result<Output>>)
Link copied to clipboard
abstract fun customMessageType(customMessageType: String): PublishBuilder
Specifies a custom message type for the message.
Link copied to clipboard
abstract fun meta(meta: Any): PublishBuilder
Sets the metadata to be sent along with the message.
Link copied to clipboard
Link copied to clipboard
abstract fun overrideConfiguration(configuration: PNConfiguration): Endpoint<T>

Allows to override certain configuration options (see com.pubnub.api.v2.PNConfigurationOverride.Builder) for this request only.

Link copied to clipboard
abstract fun replicate(replicate: Boolean): PublishBuilder
Specifies whether the message should be replicated across datacenters.
Link copied to clipboard
abstract fun retry()
Link copied to clipboard
abstract fun shouldStore(shouldStore: Boolean): PublishBuilder
Specifies whether the message should be stored in the history of the channel.
Link copied to clipboard
abstract fun silentCancel()
Link copied to clipboard
abstract fun sync(): Output
Link copied to clipboard
abstract fun ttl(ttl: Integer): PublishBuilder
Sets the time-to-live (TTL) in Message Persistence.
Link copied to clipboard
abstract fun usePOST(usePOST: Boolean): PublishBuilder
Configures the publish request to use the POST HTTP method instead of GET.