|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
unsw.cse.mica.tools.proxy.ProxySet
public abstract class ProxySet
A Proxy Set is a collection of proxy objects that reside on the server. An update request can be sent to the server to make the Proxy objects within this set update themselves, with new objects added and old ones removed. The set is defined using a MicaQL query.
| Constructor Summary | |
|---|---|
ProxySet()
|
|
| Method Summary | |
|---|---|
boolean |
add(java.lang.Object obj)
Adding an Proxy object to a ProxySet will write that object, as a Mob, to the server. |
boolean |
addAll(java.util.Collection collection)
Add a collection of Proxy objects to this set, writing any new objects to the server. |
void |
addMob(Mob m)
This method wraps the given Mob in a Proxy object and adds it to this set. |
void |
clear()
Clear the set by asking each proxy's mob to be deleted from the server. |
boolean |
contains(java.lang.Object proxy)
|
boolean |
containsAll(java.util.Collection collection)
|
Proxy |
createMember()
Create a new Proxy object for this set whose Mob has the same type as getType(). |
abstract Proxy |
createMember(Mob mob)
|
void |
deleteMob(Mob m)
Deletes the Proxy that contains this Mob from the set. |
Proxy |
get(java.lang.String name)
Get the Proxy in this set with the given name. |
abstract java.lang.String |
getType()
|
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
void |
refresh()
Clears the current collection of proxies and rereads all of them from the server. |
boolean |
remove(java.lang.Object proxy)
Removes the given proxy object from this ProxySet, if it exists, and also sends a request to the server to delete the Mob corresponding to the Proxy object deleted. |
boolean |
removeAll(java.util.Collection collection)
|
boolean |
retainAll(java.util.Collection collection)
|
void |
setAgent(ProxyAgent agent)
|
int |
size()
|
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] arg0)
|
| Methods inherited from class java.util.Observable |
|---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public ProxySet()
| Method Detail |
|---|
public abstract java.lang.String getType()
public abstract Proxy createMember(Mob mob)
public Proxy createMember()
public void setAgent(ProxyAgent agent)
public Proxy get(java.lang.String name)
name - A mob name for the Proxy to get.
public boolean add(java.lang.Object obj)
add in interface java.util.Collectionadd in interface java.util.Settrue iff the object did not already exist in this
set and was sucessfully added.public void addMob(Mob m)
m - The Mob to add.public void deleteMob(Mob m)
m - The Mob whose Proxy should be deleted from this set.public boolean addAll(java.util.Collection collection)
addAll in interface java.util.CollectionaddAll in interface java.util.Settrue iff a new element was added to this set.public void clear()
clear in interface java.util.Collectionclear in interface java.util.Setpublic boolean remove(java.lang.Object proxy)
remove in interface java.util.Collectionremove in interface java.util.Setproxy - the Proxy object to be deleted from this set and the server
true iff the Proxy was removedpublic boolean removeAll(java.util.Collection collection)
removeAll in interface java.util.CollectionremoveAll in interface java.util.Setpublic boolean retainAll(java.util.Collection collection)
retainAll in interface java.util.CollectionretainAll in interface java.util.Setpublic boolean contains(java.lang.Object proxy)
contains in interface java.util.Collectioncontains in interface java.util.Setpublic boolean containsAll(java.util.Collection collection)
containsAll in interface java.util.CollectioncontainsAll in interface java.util.Setpublic boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.Setpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Setpublic int size()
size in interface java.util.Collectionsize in interface java.util.Setpublic java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.Setpublic java.lang.Object[] toArray(java.lang.Object[] arg0)
toArray in interface java.util.CollectiontoArray in interface java.util.Setpublic void refresh()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||