org.jdesktop.wonderland.server.wfs.exporter
Interface CellExportManager

All Known Implementing Classes:
CellExportManagerImpl, CellExportService

public interface CellExportManager

A service for exporting cells. This service provides a set of asynchronous mechanisms for creating cell snapshots and recordings, and writing a set of cells to those snapshots and recordings. Callers will be notified if the export succeeds or fails.

Author:
jkaplan, Bernard Horan

Nested Class Summary
static interface CellExportManager.CellExportListener
          A listener that will be notified of the result of exporting a set of cells to a snapshot or a recording.
static interface CellExportManager.CellExportResult
          The result of exporting a cell
static interface CellExportManager.ListRecordingsListener
          A listener that will be notified of result of requesting a list of the currrent recordings accessible via the web service.
static interface CellExportManager.RecordingCreationListener
          A listener that will be notified of the success or failure of creating a recording.
static interface CellExportManager.SnapshotCreationListener
          A listener that will be notified of the success or failure of creating a snapshot.
 
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.
 

Method Detail

createSnapshot

void createSnapshot(java.lang.String name,
                    CellExportManager.SnapshotCreationListener listener)
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.

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

createRecording

void createRecording(java.lang.String name,
                     java.util.Set<CellID> cells,
                     CellExportManager.RecordingCreationListener listener)
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.

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

exportCells

void exportCells(WorldRoot worldRoot,
                 java.util.Set<CellID> cellIDs,
                 CellExportManager.CellExportListener listener,
                 boolean recordCellIDs)
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.

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

listRecordings

void listRecordings(MessageID messageID,
                    WonderlandClientSender sender,
                    WonderlandClientID clientID,
                    CellExportManager.ListRecordingsListener listener)
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.

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