ARTChannels
Objective-C
@interface ARTChannels<ChannelType> : NSObject
Swift
class ARTChannels<ChannelType> : NSObject, @unchecked Sendable where ChannelType : AnyObject
Creates and destroys ARTRestChannel and ARTRealtimeChannel objects.
-
Checks if a channel has been previously retrieved using the
-[ARTChannels get:]method.Declaration
Objective-C
- (BOOL)exists:(NSString *)name;Swift
func exists(_ name: String!) -> BoolParameters
nameThe channel name.
Return Value
trueif the channel exists, otherwisefalse. -
Creates a new
ARTRestChannelorARTRealtimeChannelobject, or returns the existing channel object.Declaration
Objective-C
- (ChannelType)get:(NSString *)name;Swift
func get(_ name: String!) -> ChannelType!Parameters
nameThe channel name.
Return Value
A
ARTRestChannelorARTRealtimeChannelobject. -
Creates a new
ARTRestChannelorARTRealtimeChannelobject, with the specifiedARTChannelOptions, or returns the existing channel object.Declaration
Objective-C
- (ChannelType)get:(NSString *)name options:(ARTChannelOptions *)options;Swift
func get(_ name: String!, options: ARTChannelOptions!) -> ChannelType!Parameters
nameThe channel name.
optionsAn
ARTChannelOptionsobject.Return Value
A
ARTRestChannelorARTRealtimeChannelobject. -
Releases an
ARTRestChannelor anARTRealtimeChannelobject by deleting it. It also removes any listeners associated with the channel. To release anARTRealtimeChannelchannel, theARTRealtimeChannelProtocol.statemust beARTRealtimeChannelState.ARTRealtimeChannelInitialized,ARTRealtimeChannelState.ARTRealtimeChannelDetached, orARTRealtimeChannelState.ARTRealtimeChannelFailed.Declaration
Objective-C
- (void)release:(NSString *)name;Swift
func release(_ name: String!)Parameters
nameThe channel name.
-
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly) NSMutableDictionary<NSString *, ChannelType> *channelsSwift
var channels: NSMutableDictionary { get } -
Undocumented
Declaration
Objective-C
@property (readonly, getter=getNosyncIterable) id<NSFastEnumeration> nosyncIterableSwift
var nosyncIterable: any NSFastEnumeration { get } -
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly) NSString *prefixSwift
var prefix: String { get } -
Undocumented
Declaration
Objective-C
- (NSString *)addPrefix:(NSString *)name;Swift
func addPrefix(_ name: String) -> String -
Undocumented
Declaration
Objective-C
- (BOOL)_exists:(NSString *)name;Swift
func _exists(_ name: String) -> Bool -
Undocumented
Declaration
Objective-C
- (ChannelType)_get:(NSString *)name;Swift
func _get(_ name: String) -> ChannelType -
Undocumented
Declaration
Objective-C
- (ChannelType)_getChannel:(NSString *)name options:(ARTChannelOptions * _Nullable)options addPrefix:(BOOL)addPrefix;Swift
func _getChannel(_ name: String, options: ARTChannelOptions?, addPrefix: Bool) -> ChannelType -
Undocumented
Declaration
Objective-C
- (void)_release:(NSString *)name;Swift
func _release(_ name: String) -
Undocumented
Declaration
Objective-C
- (instancetype)initWithDelegate:(id<ARTChannelsDelegate>)delegate dispatchQueue:(dispatch_queue_t)queue prefix:(nullable NSString *)prefix;Swift
init(delegate: any ARTChannelsDelegate, dispatchQueue queue: dispatch_queue_t, prefix: String?)