|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectthings.universe.server.UniverseLocal
public class UniverseLocal
Universe local. Relative paths are NEVER allowed.
There are some places where lock races could occur. For this simple server, it isn't much of a deal. If they become a problem, I'll fix them later. It's mostly the time between a lock is checked and the operation is actually done, like in delete.
CONFIGS:
CONFIG_PATH "path" = root path to universe
Version History
EPG - New - 2 JUL 04 EPG - Add multi-Strings. It's a bit messy now - 10 AUG 06
| Field Summary |
|---|
| Fields inherited from interface things.universe.Universe |
|---|
CONFIG_CLEARANCE, CONFIG_LIST, CONFIG_NAME, CONFIG_PATH, CONFIG_ROOT, CONFIG_TYPE, CONFIG_TYPE_LOCAL |
| Constructor Summary | |
|---|---|
UniverseLocal()
|
|
| Method Summary | |
|---|---|
void |
delete(java.lang.String... name)
Delete an object. |
void |
deleteByKey(java.lang.String key)
Delete an object. |
boolean |
exists(java.lang.String... name)
Check to see if an object exists |
java.lang.String |
feature(java.lang.String name,
ThingsPropertyView params)
Activate a feature by name. |
java.lang.String |
featureByKey(java.lang.String key,
ThingsPropertyView params)
Activate a feature by name. |
void |
finalizeUniverse()
This will always be called when the universe is accessor is destroyed. |
void |
genesis(java.lang.String path,
UniverseID uid)
This will always be called when the universe server is created. |
UniverseID |
getId()
Get the id for this universe. |
Accessor |
getObjectAccessor(java.lang.String... name)
Get an object accessor for the named object. |
java.io.InputStream |
getStream(java.lang.String... name)
Get an InputStream that can read from the universe object |
java.io.InputStream |
getStreamByKey(java.lang.String key)
Get an InputStream that can read from the universe object. |
java.lang.String |
getValidatedName(java.lang.String... name)
Get a validated name for the object. |
boolean |
isLocked(java.lang.String... name)
Check to see if the object is locked. |
long |
lastModifiedDate(java.lang.String... name)
Get the last modified date in milliseconds from epoch time. |
java.lang.String |
lock(java.lang.String... name)
Lock an object. |
java.io.File |
makeLocal(java.lang.String... name)
Make a local reference or copy of the object in a FILE. |
java.util.Collection<java.lang.String> |
match(java.lang.String... name)
Get all the object names that match the path. |
java.io.OutputStream |
putStream(java.lang.String... name)
Get an OutputStream that can write to the universe object. |
java.io.OutputStream |
putStreamAppender(java.lang.String... name)
Get an OutputStream that can write to the universe object. |
java.io.OutputStream |
putStreamAppenderByKey(java.lang.String key)
Get an OutputStream that can write to the universe object. |
java.io.OutputStream |
putStreamByKey(java.lang.String key)
Get an OutputStream that can write to the universe object. |
void |
releaseLocal(java.io.File theLocalFile)
Release a local reference or copy of the object in a FILE. |
java.lang.String |
reserveUnique(java.lang.String base)
Reserve unique object in the universe. |
long |
size(java.lang.String... name)
Report the size object from the universe in bytes. |
boolean |
unlock(java.lang.String key)
Unlock an object using a key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UniverseLocal()
| Method Detail |
|---|
public UniverseID getId()
throws UniverseException
getId in interface UniverseUniverseExceptionUniverseID
public java.lang.String getValidatedName(java.lang.String... name)
throws UniverseException
getValidatedName in interface Universename - universe object name (path components will be appended).
UniverseException
public Accessor getObjectAccessor(java.lang.String... name)
throws UniverseException
getObjectAccessor in interface Universename - universe object name (path components will be appended).
UniverseException
public java.io.InputStream getStream(java.lang.String... name)
throws UniverseException
getStream in interface Universename - universe object name (path components will be appended).
UniverseException
public java.io.InputStream getStreamByKey(java.lang.String key)
throws UniverseException
getStreamByKey in interface Universekey - a valid key for the object
UniverseException
public java.io.OutputStream putStream(java.lang.String... name)
throws UniverseException
putStream in interface Universename - universe object name (path components will be appended).
UniverseException
public java.io.OutputStream putStreamByKey(java.lang.String key)
throws UniverseException
putStreamByKey in interface Universekey - a valid key for the object
UniverseException
public java.io.OutputStream putStreamAppender(java.lang.String... name)
throws UniverseException
putStreamAppender in interface Universename - universe object name (path components will be appended).
UniverseException
public java.io.OutputStream putStreamAppenderByKey(java.lang.String key)
throws UniverseException
putStreamAppenderByKey in interface Universekey - a valid key for the object
UniverseException
public java.lang.String reserveUnique(java.lang.String base)
throws UniverseException
reserveUnique in interface Universebase - base path for the object (including root object name)
UniverseException
public java.lang.String lock(java.lang.String... name)
throws UniverseException
lock in interface Universename - universe object name (path components will be appended).
UniverseException
public boolean unlock(java.lang.String key)
throws UniverseException
unlock in interface Universekey - a key that can unlock it
UniverseException
public boolean isLocked(java.lang.String... name)
throws UniverseException
isLocked in interface Universename - universe object name (path components will be appended).
UniverseException
public java.io.File makeLocal(java.lang.String... name)
throws UniverseException
This will lock the object until released. No other operations will be allowed.
This could be a good way to subvert security, if the implementation allows it. It is up to the implementation to keep the world safe from local files.
makeLocal in interface Universename - universe object name (path components will be appended).
UniverseException
public void releaseLocal(java.io.File theLocalFile)
throws UniverseException
releaseLocal in interface UniversetheLocalFile - the file. If nonsensical, it will quietly return.
UniverseException
public boolean exists(java.lang.String... name)
throws UniverseException
exists in interface Universename - universe object name (path components will be appended).
UniverseException
public void delete(java.lang.String... name)
throws UniverseException
delete in interface Universename - universe object name (path components will be appended).
UniverseException
public void deleteByKey(java.lang.String key)
throws UniverseException
deleteByKey in interface Universekey - a key that can unlock it
UniverseException
public long size(java.lang.String... name)
throws UniverseException
size in interface Universename - universe object name (path components will be appended).
UniverseException
public long lastModifiedDate(java.lang.String... name)
throws UniverseException
lastModifiedDate in interface Universename - universe object name (path components will be appended).
UniverseException
public java.util.Collection<java.lang.String> match(java.lang.String... name)
throws UniverseException
match in interface Universename - universe object name, partial name, and/or path (path components will be appended)
UniverseException
public java.lang.String feature(java.lang.String name,
ThingsPropertyView params)
throws UniverseException
feature in interface Universename - name of the featureparams - parameters for the feature expressed as a view
UniverseExceptionThingsPropertyView
public java.lang.String featureByKey(java.lang.String key,
ThingsPropertyView params)
throws UniverseException
featureByKey in interface Universekey - key to the objectparams - parameters for the feature expressed as a view
UniverseExceptionThingsPropertyView
public void genesis(java.lang.String path,
UniverseID uid)
throws UniverseException
path - immutable path to the rootuid - immutable id
UniverseExceptionUniverseID
public void finalizeUniverse()
throws UniverseException
finalizeUniverse in interface UniverseUniverseException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||