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!) -> Bool
Parameters
name
The channel name.
Return Value
true
if the channel exists, otherwisefalse
. -
Creates a new
ARTRestChannel
orARTRealtimeChannel
object, or returns the existing channel object.Declaration
Objective-C
- (ChannelType)get:(NSString *)name;
Swift
func get(_ name: String!) -> ChannelType!
Parameters
name
The channel name.
Return Value
A
ARTRestChannel
orARTRealtimeChannel
object. -
Creates a new
ARTRestChannel
orARTRealtimeChannel
object, 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
name
The channel name.
options
An
ARTChannelOptions
object.Return Value
A
ARTRestChannel
orARTRealtimeChannel
object. -
Releases an
ARTRestChannel
or anARTRealtimeChannel
object by deleting it. It also removes any listeners associated with the channel. To release anARTRealtimeChannel
channel, theARTRealtimeChannelProtocol.state
must beARTRealtimeChannelState.ARTRealtimeChannelInitialized
,ARTRealtimeChannelState.ARTRealtimeChannelDetached
, orARTRealtimeChannelState.ARTRealtimeChannelFailed
.Declaration
Objective-C
- (void)release:(NSString *)name;
Swift
func release(_ name: String!)
Parameters
name
The channel name.
-
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly) NSMutableDictionary<NSString *, ChannelType> *channels
Swift
var channels: NSMutableDictionary { get }
-
Undocumented
Declaration
Objective-C
@property (readonly, getter=getNosyncIterable) id<NSFastEnumeration> nosyncIterable
Swift
var nosyncIterable: any NSFastEnumeration { get }
-
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly) NSString *prefix
Swift
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?)