| Modifier and Type | Field and Description |
|---|---|
protected IChannelContainerAdapter |
adapter |
protected IChannel |
channel |
| Constructor and Description |
|---|
AbstractShare(IChannelContainerAdapter adapter) |
AbstractShare(IChannelContainerAdapter adapter,
ID channelID) |
AbstractShare(IChannelContainerAdapter adapter,
ID channelID,
Map options) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
IChannel |
getChannel() |
protected void |
handleChannelEvent(org.eclipse.ecf.datashare.events.IChannelEvent event)
Handle reception of an IChannelEvent.
|
protected void |
handleConnectEvent(org.eclipse.ecf.datashare.events.IChannelConnectEvent cce) |
protected void |
handleDisconnectEvent(org.eclipse.ecf.datashare.events.IChannelDisconnectEvent cde) |
protected abstract void |
handleMessage(ID fromContainerID,
byte[] data)
Receive message for this channel.
|
boolean |
isDisposed() |
void |
sendMessage(ID toID,
byte[] data) |
protected IChannel channel
protected IChannelContainerAdapter adapter
public AbstractShare(IChannelContainerAdapter adapter) throws ECFException
ECFExceptionpublic AbstractShare(IChannelContainerAdapter adapter, ID channelID) throws ECFException
ECFExceptionpublic AbstractShare(IChannelContainerAdapter adapter, ID channelID, Map options) throws ECFException
ECFExceptionprotected void handleChannelEvent(org.eclipse.ecf.datashare.events.IChannelEvent event)
event - the IChannelEvent received. This implementation
detects instances of IChannelMessageEvent and
calls handleMessage(ID, byte[]) if found. All other
channel events are ignored. Subclasses may override to detect
and respond to other channel events as desired.protected void handleDisconnectEvent(org.eclipse.ecf.datashare.events.IChannelDisconnectEvent cde)
cde - protected void handleConnectEvent(org.eclipse.ecf.datashare.events.IChannelConnectEvent cce)
cce - protected abstract void handleMessage(ID fromContainerID, byte[] data)
fromContainerID - the ID of the sender container. Will not be null.data - the data received on the channel. Will not be null.public void sendMessage(ID toID, byte[] data) throws ECFException
ECFExceptionpublic IChannel getChannel()
public boolean isDisposed()
public void dispose()
Copyright © 2018 Eclipse Foundation. All rights reserved.