org.vrspace.server.filter
Class VRObjectFilter
java.lang.Object
org.vrspace.server.filter.VRObjectFilter
- All Implemented Interfaces:
- ObjectFilter
- Direct Known Subclasses:
- ActiveClientFilter, AdminFilter, ClassFilter, SubclassFilter
- public abstract class VRObjectFilter
- extends java.lang.Object
- implements ObjectFilter
VRObject filters are used to eliminate objects not needed in the scene.
In order to allow the scene to add and remove filters properly, filters must implement equals() method.
I.e. ActiveClientFilter returns true if Client.isActive() returns true. Thus,
each instance of this filter is equal to any other - performs same operation.
- See Also:
Scene
,
ActiveClientFilter
Method Summary |
abstract boolean |
equals(java.lang.Object o)
|
VRObject |
process(VRObject o)
This is called immediatelly after testVRObject returned true.
This allows to client to see another object instead - i.e. |
boolean |
test(java.lang.Object o)
|
abstract boolean |
testVRObject(VRObject o,
Client c)
Return true if this client should see the object |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
VRObjectFilter
public VRObjectFilter()
test
public boolean test(java.lang.Object o)
- Specified by:
test
in interface ObjectFilter
testVRObject
public abstract boolean testVRObject(VRObject o,
Client c)
- Return true if this client should see the object
equals
public abstract boolean equals(java.lang.Object o)
process
public VRObject process(VRObject o)
- This is called immediatelly after testVRObject returned true.
This allows to client to see another object instead - i.e. url rewriting.
Default - return the same object
Note: filters are chained. That is, one filter can change the object, and
other filters in chain will test changed object.
toString
public java.lang.String toString()