org.eclipse.ecf.datashare
Interface IChannelContainerAdapter

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

public interface IChannelContainerAdapter
extends IAbstractChannelContainerAdapter

Channel container entry point adapter. This interface is an adapter to allow providers to expose channels to clients. It may be used in the following way:

   IChannelContainerAdapter channelcontainer = (IChannelContainerAdapter) container.getAdapter(IChannelContainerAdapter.class);
   if (channelcontainer != null) {
      // use channelcontainer
      ...
   } else {
      // container does not support channel container functionality
   }
 


Method Summary
 IChannel createChannel(IChannelConfig newChannelConfig)
          Create a new channel within this container
 IChannel createChannel(ID channelID, IChannelListener listener, java.util.Map properties)
          Create a new channel within this container
 
Methods inherited from interface org.eclipse.ecf.datashare.IAbstractChannelContainerAdapter
addListener, getChannel, getChannelNamespace, removeChannel, removeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Method Detail

createChannel

IChannel createChannel(ID channelID,
                       IChannelListener listener,
                       java.util.Map properties)
                       throws ECFException
Create a new channel within this container

Parameters:
channelID - the ID of the new channel. Must not be null.
listener - a listener for receiving messages from remotes for this channel. May be null if no listener is to be notified.
properties - a Map of properties to provide to the channel. May be null.
Returns:
IChannel the new IChannel instance
Throws:
ECFException - if some problem creating IChannel instance

createChannel

IChannel createChannel(IChannelConfig newChannelConfig)
                       throws ECFException
Create a new channel within this container

Parameters:
newChannelConfig - the configuration for the newly created channel. Must not be null.
Returns:
IChannel the new IChannel instance. Will not be null.
Throws:
ECFException - if some problem creating IChannel instance