|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ecf.core.sharedobject.BaseSharedObject
org.eclipse.ecf.core.sharedobject.TransactionSharedObject
org.eclipse.ecf.provider.datashare.BaseChannel
public class BaseChannel
| Field Summary | |
|---|---|
protected IChannelListener |
listener
|
static java.lang.String |
RECEIVER_ID_PROPERTY
|
| Fields inherited from class org.eclipse.ecf.core.sharedobject.TransactionSharedObject |
|---|
configuration, transaction |
| Fields inherited from class org.eclipse.ecf.core.sharedobject.BaseSharedObject |
|---|
DESTROYREMOTE_CODE, DESTROYSELFLOCAL_CODE |
| Constructor Summary | |
|---|---|
BaseChannel()
Replica implementation of channel class constructor |
|
BaseChannel(ISharedObjectTransactionConfig config,
IChannelListener listener)
Primary copy implementation of channel class constructor |
|
| Method Summary | |
|---|---|
void |
dispose()
Dispose this channel. |
java.lang.Object |
getAdapter(java.lang.Class clazz)
Override of TransactionSharedObject.getAdapter() |
IChannelListener |
getListener()
Get IChannelListener instance for this IAbstractChannel |
protected ReplicaSharedObjectDescription |
getReplicaDescription(ID targetContainerID)
Override of BaseSharedObject.getReplicaDescription. |
protected void |
initialize()
Override of TransasctionSharedObject.initialize(). |
protected void |
initializeReplicaChannel()
Initialize replicas of this channel. |
protected void |
receiveUndeliveredChannelEvent(IChannelEvent channelEvent)
Receive and process channel events. |
void |
sendMessage(byte[] message)
Send message to remote instances of this channel |
void |
sendMessage(ID receiver,
byte[] message)
Send message to remote instances of this channel |
protected void |
setChannelListener(IChannelListener l)
|
IChannelListener |
setListener(IChannelListener listener)
Set listener to new IChannelListener instance |
protected void |
trace(java.lang.String msg)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.ecf.core.identity.IIdentifiable |
|---|
getID |
| Field Detail |
|---|
public static final java.lang.String RECEIVER_ID_PROPERTY
protected IChannelListener listener
| Constructor Detail |
|---|
public BaseChannel(ISharedObjectTransactionConfig config,
IChannelListener listener)
config - the ISharedObjectTransactionConfig associated with this new
host instancelistener - the listener associated with this channel instancepublic BaseChannel()
| Method Detail |
|---|
protected void setChannelListener(IChannelListener l)
protected void trace(java.lang.String msg)
protected void initialize()
throws SharedObjectInitException
initialize in class TransactionSharedObjectSharedObjectInitException - if initialization should failpublic java.lang.Object getAdapter(java.lang.Class clazz)
getAdapter in interface org.eclipse.core.runtime.IAdaptablegetAdapter in class TransactionSharedObject
public void sendMessage(byte[] message)
throws ECFException
IChannel
sendMessage in interface IChannelmessage - the byte [] message to send. Must not be null.
ECFException - if some problem sending message
public void sendMessage(ID receiver,
byte[] message)
throws ECFException
IChannel
sendMessage in interface IChannelreceiver - the ID of the container to receive message. If
null, message sent to all current members of
groupmessage - the byte [] message to send. Must not be null.
ECFException - if some problem sending messagepublic IChannelListener getListener()
IAbstractChannel
getListener in interface IAbstractChannelnull, the channel has no listener.public IChannelListener setListener(IChannelListener listener)
IAbstractChannel
setListener in interface IAbstractChannellistener - the new listener to set for this channel. If null, then there
will be no new listener for this channel.
protected void receiveUndeliveredChannelEvent(IChannelEvent channelEvent)
channelEvent - the IChannelEvent to receive and processprotected ReplicaSharedObjectDescription getReplicaDescription(ID targetContainerID)
getReplicaDescription in class BaseSharedObjecttargetContainerID - the ID of the target container for subsequentreplica creation.
If null, the target is all current group members
protected void initializeReplicaChannel()
throws SharedObjectInitException
Note that this implementation checks for the existence of the RECEIVER_ID_PROPERTY on the replica's properties, and if the property contains a valid ID will
SharedObjectInitException - if the replica initialization should failpublic void dispose()
IAbstractChannelIAbstractChannelContainerAdapter.removeChannel(org.eclipse.ecf.core.identity.ID).
dispose in interface IAbstractChannel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||