|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simantics.databoard.accessor.wire.WireServer
public class WireServer
WireServer exposes an accessor over TCP/IP socket.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.simantics.databoard.accessor.wire.IWireServer |
---|
IWireServer.AccessorInfo, IWireServer.ApplyResult |
Constructor Summary | |
---|---|
WireServer(Accessor accessor)
|
Method Summary | |
---|---|
int |
add(int accId,
int index,
MutableVariant value)
|
int |
addAll(int accId,
int index,
MutableVariant array)
add objects to array |
int |
addListener(int accId,
InterestSet interestSet,
AccessorReference path)
Create listener |
IWireServer.ApplyResult |
apply(int accId,
Event[] changeSet,
boolean rollback)
Apply a list of changes to the node. |
int |
clear(int accId)
Remove all array or map elements |
int |
closeAccessors(java.lang.Integer[] accIds)
Close a group of accessor handles. |
boolean |
containsKey(int accId,
MutableVariant key)
|
boolean |
containsValue(int accId,
MutableVariant value)
|
MutableVariant |
getArrayElement(int accId,
int index)
Get array element value |
MutableVariant |
getCeilingKey(int accId,
MutableVariant key)
|
org.simantics.databoard.accessor.wire.WireServer.ClientRecord |
getClient()
Get or create new client handler associated with current thread. |
MutableVariant |
getFirstKey(int accId)
|
MutableVariant |
getFloorKey(int accId,
MutableVariant key)
|
MutableVariant |
getHigherKey(int accId,
MutableVariant key)
|
MutableVariant |
getLastKey(int accId)
|
MutableVariant |
getLowerKey(int accId,
MutableVariant key)
|
MutableVariant |
getMapKeys(int accId)
Get map keys as array |
MutableVariant |
getMapValue(int accId,
MutableVariant key)
Get map entry value |
MutableVariant |
getMapValues(int accId)
Get map values as array |
MethodInterface |
getMethodInterface()
|
int |
getTag(int accId)
Get tag index of a Union node |
MutableVariant |
getValue(int accId)
Read the value as whole. |
boolean |
hasValue(int accId)
Get value status of an Optional node |
IWireServer.AccessorInfo |
openAccessor(AccessorReference ref)
Open a handle to an accessor. |
int |
removeListener(int lisId)
Remove listener |
int |
size(int accId)
Get size of an array, map, record or union |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WireServer(Accessor accessor)
Method Detail |
---|
public MethodInterface getMethodInterface()
public org.simantics.databoard.accessor.wire.WireServer.ClientRecord getClient() throws WireException
WireException
public IWireServer.AccessorInfo openAccessor(AccessorReference ref) throws WireException
IWireServer
openAccessor
in interface IWireServer
ref
- accessor refence or null for root
- Returns:
- accessor info
- Throws:
WireException
public int closeAccessors(java.lang.Integer[] accIds) throws WireException
IWireServer
closeAccessors
in interface IWireServer
accIds
- accessor ids
WireException
public MutableVariant getValue(int accId) throws WireException
IWireServer
getValue
in interface IWireServer
WireException
public IWireServer.ApplyResult apply(int accId, Event[] changeSet, boolean rollback)
IWireServer
In case of error rollback log is filled with events that counter modification that were already applied before the error occured.
apply
in interface IWireServer
public int addListener(int accId, InterestSet interestSet, AccessorReference path) throws WireException
IWireServer
addListener
in interface IWireServer
WireException
public int removeListener(int lisId) throws WireException
IWireServer
removeListener
in interface IWireServer
WireException
public int size(int accId) throws WireException
IWireServer
size
in interface IWireServer
WireException
public int clear(int accId) throws WireException
IWireServer
clear
in interface IWireServer
WireException
public boolean containsKey(int accId, MutableVariant key) throws WireException
containsKey
in interface IWireServer
WireException
public boolean containsValue(int accId, MutableVariant value) throws WireException
containsValue
in interface IWireServer
WireException
public MutableVariant getFirstKey(int accId) throws WireException
getFirstKey
in interface IWireServer
WireException
public MutableVariant getLastKey(int accId) throws WireException
getLastKey
in interface IWireServer
WireException
public MutableVariant getLowerKey(int accId, MutableVariant key) throws WireException
getLowerKey
in interface IWireServer
WireException
public MutableVariant getFloorKey(int accId, MutableVariant key) throws WireException
getFloorKey
in interface IWireServer
WireException
public MutableVariant getCeilingKey(int accId, MutableVariant key) throws WireException
getCeilingKey
in interface IWireServer
WireException
public MutableVariant getHigherKey(int accId, MutableVariant key) throws WireException
getHigherKey
in interface IWireServer
WireException
public boolean hasValue(int accId) throws WireException
IWireServer
hasValue
in interface IWireServer
true
if there is value in the node
WireException
public int getTag(int accId) throws WireException
IWireServer
getTag
in interface IWireServer
WireException
public int addAll(int accId, int index, MutableVariant array) throws WireException
IWireServer
addAll
in interface IWireServer
index
- insert pos, -1 = at the end
WireException
public int add(int accId, int index, MutableVariant value) throws WireException
add
in interface IWireServer
index
- insert pos, -1 = at the end
WireException
public MutableVariant getArrayElement(int accId, int index) throws WireException
IWireServer
getArrayElement
in interface IWireServer
WireException
public MutableVariant getMapValue(int accId, MutableVariant key) throws WireException
IWireServer
getMapValue
in interface IWireServer
WireException
public MutableVariant getMapValues(int accId) throws WireException
IWireServer
getMapValues
in interface IWireServer
WireException
public MutableVariant getMapKeys(int accId) throws WireException
IWireServer
getMapKeys
in interface IWireServer
WireException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |