org.eclipse.ecf.datashare
Interface IAbstractChannelContainerAdapter

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable
All Known Subinterfaces:
IChannelContainerAdapter, IDatashareService, IMergeableChannelContainerAdapter
All Known Implementing Classes:
DatashareContainer, DatashareContainerAdapter, NIODatashareContainer, SharedObjectDatashareContainerAdapter

public interface IAbstractChannelContainerAdapter
extends org.eclipse.core.runtime.IAdaptable

Super interface for IChannelContainerAdapter. Defines basic semantics for IChannelContainerAdapters.


Method Summary
 void addListener(IChannelContainerListener listener)
          Add listener for IChannelContainerAdapter events.
 IChannel getChannel(ID channelID)
          Get IChannel with given channelID.
 Namespace getChannelNamespace()
          Get expected Namespace for channel ID creation
 boolean removeChannel(ID channelID)
          Remove channel with given ID.
 void removeListener(IChannelContainerListener listener)
          Remove listener for IChannelContainerAdapter events
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Method Detail

addListener

void addListener(IChannelContainerListener listener)
Add listener for IChannelContainerAdapter events.

Parameters:
listener - to be added. Must not be null.

removeListener

void removeListener(IChannelContainerListener listener)
Remove listener for IChannelContainerAdapter events

Parameters:
listener - to be removed. Must not be null.

getChannelNamespace

Namespace getChannelNamespace()
Get expected Namespace for channel ID creation

Returns:
Namespace that can be used to create channel ID instances for this channel container. Will not be null.

getChannel

IChannel getChannel(ID channelID)
Get IChannel with given channelID.

Parameters:
channelID - the ID of the channel to get. Must not be null.
Returns:
IChannel of channel within container with given ID. Returns null if channel not found.

removeChannel

boolean removeChannel(ID channelID)
Remove channel with given ID. If the channel is found in the container, the enclosing container will call IAbstractChannel.dispose() to dispose the channel before returning from this method.

Parameters:
channelID - the ID of the channel to remove within this container. Must not be null.
Returns:
true if channel found and Removed. False if channel not found within container.