Errai 3.0.1-SNAPSHOT

org.jboss.errai.otec.client
Class AbstractOTEngine

java.lang.Object
  extended by org.jboss.errai.otec.client.AbstractOTEngine
All Implemented Interfaces:
OTEngine
Direct Known Subclasses:
OTClientEngine, OTServerEngine

public abstract class AbstractOTEngine
extends Object
implements OTEngine

Author:
Mike Brock

Nested Class Summary
protected static class AbstractOTEngine.DefaultOTOperationsFactory
           
 
Field Summary
protected  String engineId
           
protected  OTEntityState entityState
           
protected  OTEngineMode mode
           
protected  String name
           
protected  PeerState peerState
           
 
Constructor Summary
AbstractOTEngine(String name, PeerState peerState)
           
 
Method Summary
protected  OTOperation applyFromRemote(OTOperation remoteOp)
           
 OTOperation applyLocally(OTOperation operation)
           
 void associateEntity(String peerId, int entityId)
           
 void disassociateEntity(String peerId, int entityId)
           
 OTEntityState getEntityStateSpace()
           
 String getId()
           
 InitialStateReceiveHandler getInitialStateReceiveHandler(String peerId, int entityId)
           
 String getName()
           
 OTOperationsFactory getOperationsFactory()
           
 PeerState getPeerState()
           
 void notifyOperation(OTOperation operation)
           
 void notifyRemotes(OTOperation operation)
           
 void registerPeer(OTPeer peer)
           
protected  void setMode(OTEngineMode mode)
           
 void syncRemoteEntity(String peerId, int entityId, EntitySyncCompletionCallback callback)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.errai.otec.client.OTEngine
receive, start, stop
 

Field Detail

engineId

protected final String engineId

peerState

protected final PeerState peerState

entityState

protected final OTEntityState entityState

mode

protected volatile OTEngineMode mode

name

protected String name
Constructor Detail

AbstractOTEngine

public AbstractOTEngine(String name,
                        PeerState peerState)
Method Detail

applyFromRemote

protected OTOperation applyFromRemote(OTOperation remoteOp)

getId

public String getId()
Specified by:
getId in interface OTEngine

toString

public String toString()
Overrides:
toString in class Object

getName

public String getName()
Specified by:
getName in interface OTEngine

getInitialStateReceiveHandler

public InitialStateReceiveHandler getInitialStateReceiveHandler(String peerId,
                                                                int entityId)
Specified by:
getInitialStateReceiveHandler in interface OTEngine

syncRemoteEntity

public void syncRemoteEntity(String peerId,
                             int entityId,
                             EntitySyncCompletionCallback callback)
Specified by:
syncRemoteEntity in interface OTEngine

notifyOperation

public void notifyOperation(OTOperation operation)
Specified by:
notifyOperation in interface OTEngine

applyLocally

public OTOperation applyLocally(OTOperation operation)

notifyRemotes

public void notifyRemotes(OTOperation operation)

getOperationsFactory

public OTOperationsFactory getOperationsFactory()
Specified by:
getOperationsFactory in interface OTEngine

getEntityStateSpace

public OTEntityState getEntityStateSpace()
Specified by:
getEntityStateSpace in interface OTEngine

getPeerState

public PeerState getPeerState()
Specified by:
getPeerState in interface OTEngine

associateEntity

public void associateEntity(String peerId,
                            int entityId)
Specified by:
associateEntity in interface OTEngine

disassociateEntity

public void disassociateEntity(String peerId,
                               int entityId)
Specified by:
disassociateEntity in interface OTEngine

registerPeer

public void registerPeer(OTPeer peer)
Specified by:
registerPeer in interface OTEngine

setMode

protected void setMode(OTEngineMode mode)

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.