|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.smaxe.me.uv.client.SharedObject
public final class SharedObject
SharedObject
- remote shared object implementation.
Nested Class Summary | |
---|---|
static class |
SharedObject.Change
Change - change event item. |
static interface |
SharedObject.IListener
IListener - SharedObject listener. |
static class |
SharedObject.ListenerAdapter
ListenerAdapter - SharedObject.IListener adapter. |
Field Summary | |
---|---|
static ObjectEncoding |
defaultObjectEncoding
Default object encoding. |
Constructor Summary | |
---|---|
SharedObject(java.lang.String name)
Constructor. |
|
SharedObject(java.lang.String name,
boolean persistent)
Constructor. |
Method Summary | |
---|---|
void |
addEventListener(SharedObject.IListener listener)
Registers an event listener. |
void |
clear()
For local shared objects, purges all of the data and deletes the shared object from the disk. |
java.lang.Object |
client()
Returns the object on which callback methods should be invoked. |
void |
client(java.lang.Object client)
Sets the object on which callback methods should be invoked. |
void |
close()
Closes the connection between a remote shared object and the server. |
void |
connect(NetConnection connection,
java.lang.String params)
Connects to a remote shared object on the server through the specified connection. |
java.util.Hashtable |
data()
Returns shared object data. |
protected void |
fireOnAsyncError(java.lang.String message,
java.lang.Exception e)
Fires 'On Async Error' event. |
protected void |
fireOnNetStatus(java.util.Hashtable info)
Fires 'On Net Status' event. |
protected void |
fireOnSync(java.util.Vector changeList)
Fires 'On Sync' event. |
void |
flush(int minDiskSpace)
Immediately writes a locally persistent shared object to a local file. |
int |
fps()
Returns fps. |
void |
fps(int fps)
Specifies the number of times per second that a client's changes to a shared object are sent to the server. |
java.lang.String |
getName()
Returns shared object name. |
boolean |
isPersistent()
Checks if shared object is persistent. |
ObjectEncoding |
objectEncoding()
Returns object encoding. |
void |
objectEncoding(ObjectEncoding encoding)
The object encoding (AMF version). |
void |
removeEventListener(SharedObject.IListener listener)
Removes the listener. |
void |
send(java.lang.String action,
java.lang.Object[] args)
Broadcasts a message to all clients connected to the specified remote shared object, including the client that sent the message. |
void |
setDirty(java.lang.String propertyName)
Indicates to the server that the value of a property in the shared object has changed. |
void |
setProperty(java.lang.String propertyName,
java.lang.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()
Returns current size of the shared object, in bytes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static ObjectEncoding defaultObjectEncoding
Constructor Detail |
---|
public SharedObject(java.lang.String name, boolean persistent)
name
- local shared object namepersistent
- persistent flagpublic SharedObject(java.lang.String name)
name
- nameMethod Detail |
---|
public final java.lang.String getName()
public boolean isPersistent()
true
if shared object is persistent; otherwise false
public void client(java.lang.Object client)
client
- the object on which callback methods should be invokedpublic java.lang.Object client()
public void fps(int fps)
fps
- number of updates per secondpublic int fps()
public ObjectEncoding objectEncoding()
public void objectEncoding(ObjectEncoding encoding)
encoding
- encoding to setpublic void clear()
public void connect(NetConnection connection, java.lang.String params)
connection
- connectionparams
- connection parameterspublic void send(java.lang.String action, java.lang.Object[] args)
action
- actionargs
- arguments (0 or more)public java.util.Hashtable data()
data
property of the objectpublic void setProperty(java.lang.String propertyName, java.lang.Object value)
propertyName
- property namevalue
- valuepublic int size()
public void close()
public void setDirty(java.lang.String propertyName)
propertyName
- property namepublic void flush(int minDiskSpace)
minDiskSpace
- public void addEventListener(SharedObject.IListener listener)
listener
- listener to addpublic void removeEventListener(SharedObject.IListener listener)
listener
- listener to removeprotected final void fireOnAsyncError(java.lang.String message, java.lang.Exception e)
message
- e
- protected final void fireOnNetStatus(java.util.Hashtable info)
info
- protected final void fireOnSync(java.util.Vector changeList)
changeList
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |