|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simantics.databoard.Accessors
public class Accessors
This is a facade class for accessor services.
Constructor Summary | |
---|---|
Accessors()
|
Method Summary | ||
---|---|---|
static FileVariantAccessor |
createFile(java.io.File file)
Create a new binary file with an empty value and open an accessor. |
|
static
|
createFile(java.io.File file,
Datatype type)
Create a binary file (.dbb) and open an accessor. |
|
static
|
getAccessor(Binding binding,
java.lang.Object value)
Open an accessor to a Java Object. |
|
static
|
getAccessor(Binding binding,
java.lang.Object value,
AccessorParams params)
Open an accessor to a Java Object. |
|
static
|
getAccessor(byte[] binary,
Datatype type)
Open an accessor to byte data. |
|
static
|
getAccessor(java.lang.Object value)
Open Accessor to a Java Object. |
|
static
|
getAccessor(RandomAccessBinary binary,
Datatype type)
Open an accessor to byte data. |
|
static
|
getAccessor(RandomAccessBinary binary,
Datatype type,
AccessorParams params)
Open an accessor to byte data. |
|
static FileVariantAccessor |
openAccessor(java.io.File file)
Open an accessor to a binary file (.dbb). |
|
static DirectoryMap |
openDirectory(java.io.File directory)
Open a Map(Variant, Variant) accessor to a directory. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Accessors()
Method Detail |
---|
public static <T extends Accessor> T getAccessor(RandomAccessBinary binary, Datatype type, AccessorParams params) throws AccessorConstructionException
binary
- type
- params
-
AccessorConstructionException
public static <T extends Accessor> T getAccessor(RandomAccessBinary binary, Datatype type) throws AccessorConstructionException
binary
- type
-
AccessorConstructionException
public static <T extends Accessor> T getAccessor(byte[] binary, Datatype type) throws AccessorConstructionException
binary
- type
-
AccessorConstructionException
public static <T extends Accessor> T getAccessor(Binding binding, java.lang.Object value, AccessorParams params) throws AccessorConstructionException
Accessor is disposed by leaving it to garbage collector.
Do not modify the object outside the accessor as long as you use the accessor. Exterioir modifications will mix up listening the mechanism. Also, do not create more than one accessor to one Object.
You must provide mutual exclusion locking mechanism to the whole Object Model in AccessorParams, if you intend to use the accessors in multi-thread environment.
binding
- value
-
AccessorConstructionException
public static <T extends Accessor> T getAccessor(Binding binding, java.lang.Object value) throws AccessorConstructionException
Accessor is disposed by leaving it to garbage collector.
Do not modify the object outside the accessor as long as you use the accessor. Exterioir modifications will mix up listening the mechanism. Also, do not create more than one accessor to one Object.
The accessor is not multi-thread accessible. If you intend to use it in concurrent multi-thread environment, use the other method where you can pass lock objects in AccessorParams.
binding
- value
-
AccessorConstructionException
public static <T extends Accessor> T getAccessor(java.lang.Object value) throws AccessorConstructionException
Accessor is disposed by leaving it to garbage collector.
Do not modify the object outside the accessor as long as you use the accessor. Exterioir modifications will mix up listening the mechanism. Also, do not create more than one accessor to one Object.
The accessor is not multi-thread accessible. If you intend to use it in concurrent multi-thread environment, use the other method where you can pass lock objects in AccessorParams.
value
-
AccessorConstructionException
public static FileVariantAccessor openAccessor(java.io.File file) throws AccessorConstructionException
FileAccessor.close()
at
root or any sub-accessor.
To share accessors of the same file use FileLibrary
utility.
file
-
AccessorConstructionException
public static FileVariantAccessor createFile(java.io.File file) throws AccessorConstructionException
The caller must close the file with FileAccessor.close()
.
file
-
AccessorConstructionException
public static <T extends FileAccessor> T createFile(java.io.File file, Datatype type) throws AccessorConstructionException
File is closed with FileAccessor.close()
at root or any
sub-accessor.
To share accessors of the same file use FileLibrary
utility.
T
- file
- type
-
AccessorConstructionException
public static DirectoryMap openDirectory(java.io.File directory)
directory
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |