java.lang.Object
java.util.Observable
org.vrspace.server.VRObject
org.vrspace.server.DBObject
org.vrspace.server.PublicDBObject
org.vrspace.server.OwnedDBObject
org.vrspace.server.object.File
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Observer, org.vrspace.attributes.Owned
- Direct Known Subclasses:
- VrmlFile
- public class File
- extends org.vrspace.server.OwnedDBObject
- implements java.util.Observer
A File. This VRObject should be used for files not expected to
have a Transform. For example, images, binaries, etc...
The contents of the file are pointed to by its url NetResource.
| Fields inherited from class org.vrspace.server.DBObject |
db |
|
Constructor Summary |
File()
|
| Methods inherited from class org.vrspace.server.VRObject |
arrayToString, canRead, canWrite, clone, equals, fromString, fromText, getClassName, getField, getFields, getId, getID, getMemebers, hasField, hasMethod, isNew, newInstance, sendResponse, setField, setField, setField, setFields, setFields, stringToArray, toString, toText, toText, toText |
name
public java.lang.String name
url
public org.vrspace.util.NetResource url
_uploads
public int _uploads
_downloads
public int _downloads
_lastUpdate
public long _lastUpdate
File
public File()
set_upload
public void set_upload(org.vrspace.server.Request req,
java.lang.String value)
throws java.lang.Exception
- Initiate file upload.
Replaces this File's url and initiates the file transfer by responding
to the client with an upload command.
Usage: upload path
set_download
public void set_download(org.vrspace.server.Request req,
java.lang.String value)
throws java.lang.Exception
- Initiate file download. Not implemented.
Usage: download dummy_value
update
public void update(java.util.Observable session,
java.lang.Object signal)
- Description copied from interface:
java.util.Observer
- This method is called whenever the observable object changes, and has
called
notifyObservers. The Observable object can pass
arbitrary information in the second parameter.
- Specified by:
update in interface java.util.Observer
setValue
public void setValue(org.vrspace.server.Request r)
- Overrides PublicDbObject.setValue() .
Upload/download events are filtered. Clients are notified of all other
requests.