public class SharedObjectDatashareContainerAdapter extends BaseSharedObject implements IChannelContainerAdapter
| Modifier and Type | Field and Description |
|---|---|
protected List |
channelContainerListeners |
protected static int |
DEFAULT_TRANSACTION_WAIT |
DESTROYREMOTE_CODE, DESTROYSELFLOCAL_CODE| Constructor and Description |
|---|
SharedObjectDatashareContainerAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(IChannelContainerListener listener)
Add listener for IChannelContainerAdapter events.
|
IChannel |
createChannel(IChannelConfig newChannelConfig)
Create a new channel within this container
|
IChannel |
createChannel(ID newID,
IChannelListener listener,
Map properties)
Create a new channel within this container
|
protected SharedObjectDescription |
createChannelSharedObjectDescription(IChannelConfig channelConfig) |
protected ISharedObjectTransactionConfig |
createChannelSharedObjectTransactionConfig() |
protected ISharedObject |
createSharedObject(SharedObjectTypeDescription typeDescription,
ISharedObjectTransactionConfig transactionConfig,
IChannelListener listener) |
protected void |
fireChannelContainerListeners(org.eclipse.ecf.datashare.events.IChannelContainerEvent event) |
Object |
getAdapter(Class adapter) |
IChannel |
getChannel(ID channelID)
Get IChannel with given channelID.
|
Namespace |
getChannelNamespace()
Get expected Namespace for channel ID creation
|
protected void |
initialize()
Initialize this shared object.
|
boolean |
removeChannel(ID channelID)
Remove channel with given ID.
|
void |
removeListener(IChannelContainerListener listener)
Remove listener for IChannelContainerAdapter events
|
addEventProcessor, clearEventProcessors, creationCompleted, destroyRemote, destroySelf, destroySelfLocal, dispose, fireEventProcessors, getConfig, getConnectedID, getContext, getGroupMemberIDs, getHomeContainerID, getID, getLocalContainerID, getProperties, getReplicaDescription, getReplicaDescriptions, getSharedObjectMsgFromEvent, handleEvent, handleEvents, handleSharedObjectCreateResponseEvent, handleSharedObjectMsg, handleSharedObjectMsg, handleSharedObjectMsgEvent, handleUnhandledEvent, init, isConnected, isPrimary, log, log, removeEventProcessor, replicateToRemoteContainers, sendSharedObjectMsgTo, sendSharedObjectMsgToPrimary, sendSharedObjectMsgToSelf, trace, traceCatching, traceEntering, traceEntering, traceEntering, traceExiting, traceExitingprotected static final int DEFAULT_TRANSACTION_WAIT
protected List channelContainerListeners
public SharedObjectDatashareContainerAdapter()
protected void initialize()
throws SharedObjectInitException
BaseSharedObjectinitialize in class BaseSharedObjectSharedObjectInitException - if initialization should throwprotected void fireChannelContainerListeners(org.eclipse.ecf.datashare.events.IChannelContainerEvent event)
public IChannel createChannel(ID newID, IChannelListener listener, Map properties) throws ECFException
IChannelContainerAdaptercreateChannel in interface IChannelContainerAdapternewID - 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.ECFException - if some problem creating IChannel instanceprotected SharedObjectDescription createChannelSharedObjectDescription(IChannelConfig channelConfig) throws ECFException
channelConfig - null instance.ECFException - not thrown by this implementation.protected ISharedObjectTransactionConfig createChannelSharedObjectTransactionConfig()
protected ISharedObject createSharedObject(SharedObjectTypeDescription typeDescription, ISharedObjectTransactionConfig transactionConfig, IChannelListener listener) throws SharedObjectCreateException
SharedObjectCreateExceptionpublic IChannel createChannel(IChannelConfig newChannelConfig) throws ECFException
IChannelContainerAdaptercreateChannel in interface IChannelContainerAdapternewChannelConfig - the configuration for the newly created channel. Must not be
null.null.ECFException - if some problem creating IChannel instancepublic IChannel getChannel(ID channelID)
IAbstractChannelContainerAdaptergetChannel in interface IAbstractChannelContainerAdapterchannelID - the ID of the channel to get. Must not be null.null if channel not found.public boolean removeChannel(ID channelID)
IAbstractChannelContainerAdapterIAbstractChannel.dispose() to dispose the channel
before returning from this method.removeChannel in interface IAbstractChannelContainerAdapterchannelID - the ID of the channel to remove within this container. Must
not be null.public Namespace getChannelNamespace()
IAbstractChannelContainerAdaptergetChannelNamespace in interface IAbstractChannelContainerAdapternull.public void addListener(IChannelContainerListener listener)
IAbstractChannelContainerAdapteraddListener in interface IAbstractChannelContainerAdapterlistener - to be added. Must not be null.public void removeListener(IChannelContainerListener listener)
IAbstractChannelContainerAdapterremoveListener in interface IAbstractChannelContainerAdapterlistener - to be removed. Must not be null.public Object getAdapter(Class adapter)
getAdapter in interface org.eclipse.core.runtime.IAdaptablegetAdapter in class BaseSharedObjectCopyright © 2017. All rights reserved.