|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISharedObject
ISharedObject
- shared object (replica of ActionScript's
SharedObject class interface).
Nested Class Summary | |
---|---|
static class |
ISharedObject.Change
Change - change event item. |
static interface |
ISharedObject.IListener
IListener - SharedObject listener. |
static class |
ISharedObject.ListenerAdapter
ListenerAdapter - ISharedObject.IListener adapter. |
Field Summary | |
---|---|
static ObjectEncoding |
defaultObjectEncoding
Default object encoding. |
Method Summary | |
---|---|
void |
addEventListener(ISharedObject.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(INetConnection connection,
java.lang.String params)
Connects to a remote shared object on the server through the specified connection. |
java.util.Map<java.lang.String,java.lang.Object> |
data()
Returns shared object data. |
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(ISharedObject.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. |
Field Detail |
---|
static final ObjectEncoding defaultObjectEncoding
Method Detail |
---|
java.lang.String getName()
boolean isPersistent()
true
if shared object is persistent; otherwise false
void client(java.lang.Object client)
client
- the object on which callback methods should be invokedjava.lang.Object client()
java.util.Map<java.lang.String,java.lang.Object> data()
data
property of the objectvoid fps(int fps)
fps
- number of updates per secondint fps()
ObjectEncoding objectEncoding()
void objectEncoding(ObjectEncoding encoding)
encoding
- encoding to setint size()
void clear()
void close()
void connect(INetConnection connection, java.lang.String params)
connection
- connectionparams
- connection parametersvoid flush(int minDiskSpace)
minDiskSpace
- void send(java.lang.String action, java.lang.Object... args)
action
- actionargs
- arguments (0 or more)void setDirty(java.lang.String propertyName)
propertyName
- property namevoid setProperty(java.lang.String propertyName, java.lang.Object value)
propertyName
- property namevalue
- valuevoid addEventListener(ISharedObject.IListener listener)
listener
- listener to addvoid removeEventListener(ISharedObject.IListener listener)
listener
- listener to remove
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |