flash.net
Class SharedObject

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by flash.events.EventDispatcher
          extended by flash.net.SharedObject

public class SharedObject
extends EventDispatcher

Implementation of flash.net.SharedObject


Field Summary
static EventType ASYNCERROR
          Dispatched when an exception is thrown asynchronously — that is, from native asynchronous code.
static EventType NETSTATUS
          Dispatched when a SharedObject instance is reporting its status or error condition.
static EventType SYNC
          Dispatched when a remote shared object has been updated by the server.
 
Fields inherited from class flash.events.EventDispatcher
ACTIVATE, DEACTIVATE
 
Constructor Summary
protected SharedObject()
           
 
Method Summary
 void clear()
          For local shared objects, purges all of the data and deletes the shared object from the disk.
 void close()
          Closes the connection between a remote shared object and the server.
 String flush(int minDiskSpace)
          Immediately writes a locally persistent shared object to a local file.
 com.google.gwt.core.client.JavaScriptObject getData()
          The collection of attributes assigned to the data property of the object; these attributes can be shared and stored.
static SharedObject getLocal(String name, String localPath, boolean secure)
          Returns a reference to a locally persistent shared object that is only available to the current client.
 void setProperty(String propertyName, Object value)
          Updates the value of a property in a shared object and indicates to the server that the value of the property has changed.
 int size()
          The current size of the shared object, in bytes.
 
Methods inherited from class flash.events.EventDispatcher
addEventListener, create, dispatchEvent, hasEventListener, removeEventListener, willTrigger
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ASYNCERROR

public static final EventType ASYNCERROR
Dispatched when an exception is thrown asynchronously — that is, from native asynchronous code.


NETSTATUS

public static final EventType NETSTATUS
Dispatched when a SharedObject instance is reporting its status or error condition.


SYNC

public static final EventType SYNC
Dispatched when a remote shared object has been updated by the server.

Constructor Detail

SharedObject

protected SharedObject()
Method Detail

getLocal

public static SharedObject getLocal(String name,
                                    String localPath,
                                    boolean secure)
Returns a reference to a locally persistent shared object that is only available to the current client.

Parameters:
name -
localPath -
Returns:

getData

public final com.google.gwt.core.client.JavaScriptObject getData()
The collection of attributes assigned to the data property of the object; these attributes can be shared and stored.

Returns:

size

public final int size()
The current size of the shared object, in bytes.

Returns:

clear

public final void clear()
For local shared objects, purges all of the data and deletes the shared object from the disk.


close

public final void close()
Closes the connection between a remote shared object and the server.


flush

public final String flush(int minDiskSpace)
Immediately writes a locally persistent shared object to a local file.

Parameters:
minDiskSpace -
Returns:

setProperty

public final void setProperty(String propertyName,
                              Object value)
Updates the value of a property in a shared object and indicates to the server that the value of the property has changed.

Parameters:
propertyName -
value -


Copyright © 2012. All Rights Reserved.