CBLURLEndpointListenerConfiguration

@interface CBLURLEndpointListenerConfiguration : NSObject

ENTERPRISE EDITION ONLY.

The configuration used for configuring and creating a URLEndpointListener.

  • Deprecated

    Use collections instead.

    The database object.

    Declaration

    Objective-C

    @property (nonatomic, readonly) __deprecated_msg("Use collections instead.") CBLDatabase *database;
  • The port that the listener will listen to. Default value is kCBLDefaultListenerPort If the value is zero, it means that the listener will automatically select an available port to listen to when the listener is started.

    Declaration

    Objective-C

    @property (nonatomic) unsigned short port;
  • The network interface in the form of the IP Address or network interface name such as en0 that the listener will listen to. The default value is nil which means that the listener will listen to all network interfaces.

    Declaration

    Objective-C

    @property (nonatomic, nullable) NSString *networkInterface;
  • Disable TLS communication. The default value is kCBLDefaultListenerDisableTls

    Declaration

    Objective-C

    @property (nonatomic) BOOL disableTLS;
  • The TLS Identity used for configuring TLS Communication. The default value is nil which means that a generated anonymous self-signed identity will be used unless the disableTLS property is set to YES.

    Declaration

    Objective-C

    @property (nonatomic, nullable) CBLTLSIdentity *tlsIdentity;
  • The authenticator used by the listener to authenticate clients.

    Declaration

    Objective-C

    @property (nonatomic, nullable) id<CBLListenerAuthenticator> authenticator;
  • Allow delta sync when replicating with the listener. The default value is kCBLDefaultListenerEnableDeltaSync.

    Declaration

    Objective-C

    @property (nonatomic) BOOL enableDeltaSync;
  • Allow only pull replication to pull changes from the listener. The default value is kCBLDefaultListenerReadOnly.

    Declaration

    Objective-C

    @property (nonatomic) BOOL readOnly;
  • The collections available for replication. When the [… initWithDatabase: target:] is used, the collections property will contain the default collection.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray *_Nonnull collections;
  • Deprecated

    Use [… initWithCollections:] instead.

    Init with the database object to make the default collection available for the replication.

    Declaration

    Objective-C

    - (nonnull id)initWithDatabase:(nonnull CBLDatabase *)database;
  • Init with the collections that will be available for replication.

    The specified collections must contain at least one collection, otherwise an Invalid Argument Exception will be thrown.

    Currently only collections from a single scope are supported, otherwise an Invalid Argument Exception will be thrown.

    All of the collections must belong to the same database, otherwise an Invalid Argument Exception will be thrown.

    If one of the collections is removed during the replication, the listener would be stopped, and the connections to the connected clients would be closed with an error - Need to sync the behavior and error code with SG.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithCollections:(nonnull NSArray *)collections;

    Parameters

    collections

    list of collection available to sync

  • Initializes a listener with the configuration object.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithConfig:
        (nonnull CBLURLEndpointListenerConfiguration *)config;
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    - (instancetype) init NS_UNAVAILABLE;