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, traceExiting
protected static final int DEFAULT_TRANSACTION_WAIT
protected List channelContainerListeners
public SharedObjectDatashareContainerAdapter()
protected void initialize() throws SharedObjectInitException
BaseSharedObject
initialize
in class BaseSharedObject
SharedObjectInitException
- if initialization should throwprotected void fireChannelContainerListeners(org.eclipse.ecf.datashare.events.IChannelContainerEvent event)
public IChannel createChannel(ID newID, IChannelListener listener, Map properties) throws ECFException
IChannelContainerAdapter
createChannel
in interface IChannelContainerAdapter
newID
- 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
SharedObjectCreateException
public IChannel createChannel(IChannelConfig newChannelConfig) throws ECFException
IChannelContainerAdapter
createChannel
in interface IChannelContainerAdapter
newChannelConfig
- the configuration for the newly created channel. Must not be
null
.null
.ECFException
- if some problem creating IChannel instancepublic IChannel getChannel(ID channelID)
IAbstractChannelContainerAdapter
getChannel
in interface IAbstractChannelContainerAdapter
channelID
- the ID of the channel to get. Must not be null
.null
if channel not found.public boolean removeChannel(ID channelID)
IAbstractChannelContainerAdapter
IAbstractChannel.dispose()
to dispose the channel
before returning from this method.removeChannel
in interface IAbstractChannelContainerAdapter
channelID
- the ID of the channel to remove within this container. Must
not be null
.public Namespace getChannelNamespace()
IAbstractChannelContainerAdapter
getChannelNamespace
in interface IAbstractChannelContainerAdapter
null
.public void addListener(IChannelContainerListener listener)
IAbstractChannelContainerAdapter
addListener
in interface IAbstractChannelContainerAdapter
listener
- to be added. Must not be null
.public void removeListener(IChannelContainerListener listener)
IAbstractChannelContainerAdapter
removeListener
in interface IAbstractChannelContainerAdapter
listener
- to be removed. Must not be null
.public Object getAdapter(Class adapter)
getAdapter
in interface org.eclipse.core.runtime.IAdaptable
getAdapter
in class BaseSharedObject
Copyright © 2017. All rights reserved.