org.jdesktop.wonderland.server.cell
Class ServerProximityListenerRecord

java.lang.Object
  extended by org.jdesktop.wonderland.common.cell.ProximityListenerRecord
      extended by org.jdesktop.wonderland.server.cell.ServerProximityListenerRecord
All Implemented Interfaces:
java.io.Serializable, TransformChangeListenerSrv, ViewUpdateListener

public class ServerProximityListenerRecord
extends ProximityListenerRecord
implements TransformChangeListenerSrv, ViewUpdateListener

This listener record provides the server specific hooks for the generic proximity listener code, which is shared with the client code.

Author:
paulby
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jdesktop.wonderland.common.cell.ProximityListenerRecord
ProximityListenerRecord.ProximityListenerWrapper
 
Field Summary
 
Fields inherited from class org.jdesktop.wonderland.common.cell.ProximityListenerRecord
lastContainerIndexMap, lock, proximityListener
 
Method Summary
protected  java.util.Map<CellID,java.lang.Integer> getIndexMap()
          Override to use a transactional version of this map.
 void transformChanged(com.sun.sgs.app.ManagedReference<CellMO> cellRef, CellTransform localTransform, CellTransform worldTransform)
          Called when the cells transform has changed.
 void viewLoggedIn(CellID cell, CellID viewCellID)
          Notification that a view that is displaying this cell logged in.
 void viewLoggedOut(CellID cell, CellID viewCellID)
          Notification that a view logged out
 void viewTransformChanged(CellID cell, CellID viewCellID, CellTransform viewWorldTransform)
          This may be called concurrently from multiple threads, so implentations must be thread safe
 
Methods inherited from class org.jdesktop.wonderland.common.cell.ProximityListenerRecord
cleanup, equals, getWorldBounds, hashCode, setProximityBounds, updateWorldBounds, viewCellExited, viewCellMoved, viewCellMoved
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

viewTransformChanged

public void viewTransformChanged(CellID cell,
                                 CellID viewCellID,
                                 CellTransform viewWorldTransform)
Description copied from interface: ViewUpdateListener
This may be called concurrently from multiple threads, so implentations must be thread safe

Specified by:
viewTransformChanged in interface ViewUpdateListener

viewLoggedIn

public void viewLoggedIn(CellID cell,
                         CellID viewCellID)
Description copied from interface: ViewUpdateListener
Notification that a view that is displaying this cell logged in.

Specified by:
viewLoggedIn in interface ViewUpdateListener
viewCellID - the view that has this cell in its cache

viewLoggedOut

public void viewLoggedOut(CellID cell,
                          CellID viewCellID)
Description copied from interface: ViewUpdateListener
Notification that a view logged out

Specified by:
viewLoggedOut in interface ViewUpdateListener
Parameters:
cell - the cell that is being monitored
viewCellID - the view cell that logged out

transformChanged

public void transformChanged(com.sun.sgs.app.ManagedReference<CellMO> cellRef,
                             CellTransform localTransform,
                             CellTransform worldTransform)
Description copied from interface: TransformChangeListenerSrv
Called when the cells transform has changed.

Specified by:
transformChanged in interface TransformChangeListenerSrv

getIndexMap

protected java.util.Map<CellID,java.lang.Integer> getIndexMap()
Override to use a transactional version of this map.

Overrides:
getIndexMap in class ProximityListenerRecord
Returns:
the transactional map


Open Wonderland - http://openwonderland.org