org.eclipse.ecf.example.clients
Class TestSharedObject

java.lang.Object
  extended by org.eclipse.ecf.core.sharedobject.BaseSharedObject
      extended by org.eclipse.ecf.example.clients.TestSharedObject
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, IIdentifiable, ISharedObject

public class TestSharedObject
extends BaseSharedObject


Field Summary
static java.lang.String NAME_PROPERTY
           
 
Fields inherited from class org.eclipse.ecf.core.sharedobject.BaseSharedObject
DESTROYREMOTE_CODE, DESTROYSELFLOCAL_CODE
 
Constructor Summary
TestSharedObject()
          Replica constructor (null constructor)
TestSharedObject(java.lang.String name)
          Primary constructor
 
Method Summary
protected  ReplicaSharedObjectDescription getReplicaDescription(ID receiver)
          Get a ReplicaSharedObjectDescription for a replica to be created on a given receiver.
protected  void initialize()
          Initialize this shared object.
 
Methods inherited from class org.eclipse.ecf.core.sharedobject.BaseSharedObject
addEventProcessor, clearEventProcessors, creationCompleted, destroyRemote, destroySelf, destroySelfLocal, dispose, fireEventProcessors, getAdapter, getConfig, getConnectedID, getContext, getGroupMemberIDs, getHomeContainerID, getID, getLocalContainerID, getProperties, getReplicaDescriptions, getSharedObjectMsgFromEvent, handleEvent, handleEvents, handleSharedObjectCreateResponseEvent, handleSharedObjectMsg, handleSharedObjectMsgEvent, handleUnhandledEvent, init, isConnected, isPrimary, log, log, removeEventProcessor, replicateToRemoteContainers, sendSharedObjectMsgTo, sendSharedObjectMsgToPrimary, sendSharedObjectMsgToSelf, traceCatching, traceEntering, traceEntering, traceEntering, traceExiting, traceExiting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME_PROPERTY

public static final java.lang.String NAME_PROPERTY
See Also:
Constant Field Values
Constructor Detail

TestSharedObject

public TestSharedObject(java.lang.String name)
Primary constructor

Parameters:
name - the name to say hello to

TestSharedObject

public TestSharedObject()
Replica constructor (null constructor)

Method Detail

initialize

protected void initialize()
                   throws SharedObjectInitException
Description copied from class: BaseSharedObject
Initialize this shared object. Subclasses may override as appropriate to define custom initialization behavior. If initialization should fail, then a SharedObjectInitException should be thrown by implementing code. Also, subclasses overriding this method should call super.initialize() before running their own code.

Overrides:
initialize in class BaseSharedObject
Throws:
SharedObjectInitException - if initialization should throw

getReplicaDescription

protected ReplicaSharedObjectDescription getReplicaDescription(ID receiver)
Description copied from class: BaseSharedObject
Get a ReplicaSharedObjectDescription for a replica to be created on a given receiver.

Overrides:
getReplicaDescription in class BaseSharedObject
Parameters:
receiver - the receiver the ReplicaSharedObjectDescription is for
Returns:
ReplicaSharedObjectDescription to be associated with given receiver. A non-null ReplicaSharedObjectDescription must be returned.