org.jdesktop.wonderland.server.wfs.exporter
Class CellExportManagerImpl

java.lang.Object
  extended by org.jdesktop.wonderland.server.wfs.exporter.CellExportManagerImpl
All Implemented Interfaces:
CellExportManager

public class CellExportManagerImpl
extends java.lang.Object
implements CellExportManager

Implementation of CellExportManager. This just forwards everything to the service.

Author:
jkaplan, Bernard Horan

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jdesktop.wonderland.server.wfs.exporter.CellExportManager
CellExportManager.CellExportListener, CellExportManager.CellExportResult, CellExportManager.ListRecordingsListener, CellExportManager.RecordingCreationListener, CellExportManager.SnapshotCreationListener
 
Constructor Summary
CellExportManagerImpl(CellExportService service)
           
 
Method Summary
 void createRecording(java.lang.String name, java.util.Set<CellID> cells, CellExportManager.RecordingCreationListener listener)
          Create a new recording for writing cells to.
 void createSnapshot(java.lang.String name, CellExportManager.SnapshotCreationListener listener)
          Create a new snapshot for writing cells to.
 void exportCells(WorldRoot worldRoot, java.util.Set<CellID> cellIDs, CellExportManager.CellExportListener listener, boolean recordCellIDs)
          Write a set of cells to the given snapshot/recording.
 void listRecordings(MessageID messageID, WonderlandClientSender sender, WonderlandClientID clientID, CellExportManager.ListRecordingsListener listener)
          List the recordings that are currently accessible via the web service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CellExportManagerImpl

public CellExportManagerImpl(CellExportService service)
Method Detail

createSnapshot

public void createSnapshot(java.lang.String name,
                           CellExportManager.SnapshotCreationListener listener)
Description copied from interface: CellExportManager
Create a new snapshot for writing cells to. This method will contact the remote web service to create a new snapshot, and then call the given listener with the result of that call.

Specified by:
createSnapshot in interface CellExportManager
Parameters:
name - the name of the snapshot to create, or null to use the default name
listener - a snapshot creation listener that will be notified of the result of this call

exportCells

public void exportCells(WorldRoot worldRoot,
                        java.util.Set<CellID> cellIDs,
                        CellExportManager.CellExportListener listener,
                        boolean recordCellIDs)
Description copied from interface: CellExportManager
Write a set of cells to the given snapshot/recording. This method will fetch the given set of cells, and write the contents of the cells and all their children to the remote web service. Finally, the listener will be notified with the results of the call.

Specified by:
exportCells in interface CellExportManager
Parameters:
worldRoot - the snapshot/recording to write to
cellIDs - a set of cell IDs to write. Each cellID will be used as a root for writing, so the entire graph under the given set of cell IDs will be written. The cellIDs set will be accessed across multiple Darkstar transactions, so it is essential that the iterator for the set be serializable and work correctly in the face of concurrent access. Typically, a ScalableHashSet is the best choice for the set.
listener - a listener that will be notified of the results
recordCellIDs - if true, record the cellID of each cell

createRecording

public void createRecording(java.lang.String name,
                            java.util.Set<CellID> cells,
                            CellExportManager.RecordingCreationListener listener)
Description copied from interface: CellExportManager
Create a new recording for writing cells to. This method will contact the remote web service to create a new recording, and then call the given listener with the result of that call.

Specified by:
createRecording in interface CellExportManager
Parameters:
name - the name of the recording to create
cells - the set of cells to record
listener - a recording creation listener that will be notified of the result of this call

listRecordings

public void listRecordings(MessageID messageID,
                           WonderlandClientSender sender,
                           WonderlandClientID clientID,
                           CellExportManager.ListRecordingsListener listener)
Description copied from interface: CellExportManager
List the recordings that are currently accessible via the web service. This is used to respond to a client's request to open a form for a user to select a "tape".

The listener will be notifed with the results of the call. The inclusion of these parameters is because the originating message requires a ResponseMessage return, which in turn requires these parameters.

Specified by:
listRecordings in interface CellExportManager
Parameters:
messageID - the id of the message that originated the request
sender - the sender of the message request
clientID - the wonderlandClientID of the request
listener - a list recordings listener whose method listRecordingsResult is called on success, or listRecordingsFailed on failure.


Open Wonderland - http://openwonderland.org