-
public interface LiveObjectsPluginThe LiveObjectsPlugin interface provides a mechanism for managing and interacting with live data objects in a real-time environment. It allows for the retrieval, disposal, and management of Objects instances associated with specific channel names.
-
-
Method Summary
Modifier and Type Method Description abstract RealtimeObjectsgetInstance(@NotNull() String channelName)Retrieves an instance of RealtimeObjects associated with the specified channel name.This method ensures that a RealtimeObjects instance is available for the given channel,creating one if it does not already exist. abstract voidhandle(@NotNull() ProtocolMessage message)Handles a protocol message.This method is invoked whenever a protocol message is received, allowing the implementationto process the message and take appropriate actions. abstract voidhandleStateChange(@NotNull() String channelName, @NotNull() ChannelState state, boolean hasObjects)Handles state changes for a specific channel.This method is invoked whenever a channel's state changes, allowing the implementationto update the RealtimeObjects instances accordingly based on the new state and presence of objects. abstract voiddispose(@NotNull() String channelName)Disposes of the RealtimeObjects instance associated with the specified channel name.This method removes the RealtimeObjects instance for the given channel, releasing anyresources associated with it.This is invoked when ablyRealtimeClient.channels. abstract voiddispose()Disposes of the plugin instance and all underlying resources.This is invoked when ablyRealtimeClient. -
-
Method Detail
-
getInstance
@NotNull() abstract RealtimeObjects getInstance(@NotNull() String channelName)
Retrieves an instance of RealtimeObjects associated with the specified channel name.This method ensures that a RealtimeObjects instance is available for the given channel,creating one if it does not already exist.
- Parameters:
channelName- the name of the channel for which the RealtimeObjects instance is to be retrieved.
-
handle
abstract void handle(@NotNull() ProtocolMessage message)
Handles a protocol message.This method is invoked whenever a protocol message is received, allowing the implementationto process the message and take appropriate actions.
- Parameters:
message- the protocol message to handle.
-
handleStateChange
abstract void handleStateChange(@NotNull() String channelName, @NotNull() ChannelState state, boolean hasObjects)
Handles state changes for a specific channel.This method is invoked whenever a channel's state changes, allowing the implementationto update the RealtimeObjects instances accordingly based on the new state and presence of objects.
- Parameters:
channelName- the name of the channel whose state has changed.state- the new state of the channel.hasObjects- flag indicates whether the channel has any associated objects.
-
dispose
abstract void dispose(@NotNull() String channelName)
Disposes of the RealtimeObjects instance associated with the specified channel name.This method removes the RealtimeObjects instance for the given channel, releasing anyresources associated with it.This is invoked when ablyRealtimeClient.channels.release(channelName) is called
- Parameters:
channelName- the name of the channel whose RealtimeObjects instance is to be removed.
-
dispose
abstract void dispose()
Disposes of the plugin instance and all underlying resources.This is invoked when ablyRealtimeClient.close() is called
-
-
-
-