public class PropMgr extends Object
NameManager
that can be retrieved from this class is used to map property names to integer values, i.e. indexes. Each client session (just one for the client) and several for the server must instanciate this class once and is used throughout the entire session.
Modifier and Type | Field and Description |
---|---|
static int |
CLIENT
The application type: CLIENT = 0.
|
static int |
EDITOR
The application type: EDITOR = 2.
|
static int |
SERVER
The application type: SERVER = 1.
|
Modifier and Type | Method and Description |
---|---|
void |
appendPropMgrData(Transaction trans)
Appends data from the property manager to a transaction.
|
boolean |
areNewAtomsPresent()
Checks if append property manager data is required.
|
ClientProps |
createClientRootContainer(IModuleProjectPropProvider modulePropProvider)
Creates the client root container.
|
ClientProps |
createRootContainer(Transaction trans,
IModuleProjectPropProvider modulePropProvider)
Creates the root container on the client side at the reception of the TRANS_CREATE
transaction, initiates it from the Transaction and returns it.
|
void |
dispatchEvents()
Dispatches queued events for processing.
|
StringMapProp |
getClientEnv()
Gets the Client Environment.
|
EnvProps |
getEnvironment()
Gets the Environment property.
|
IPropMgrOwner |
getOwner()
Gets the owner Object of this Property Manager instance.
|
IPropMgrInfoProvider |
getProvider()
Returns the information provider.
|
ClientProps |
getRootContainer()
Gets the root container.
|
Transaction |
getSendTransaction(ITransactionCreator transCreator)
Gets a transaction for sending.
|
int |
getType()
Get the Property Manager type.
|
boolean |
hasJavaScriptClient()
Returns if this has a JavaScript client or not.
|
boolean |
hasRemoteEventTrans()
Gets a Remote Event transaction from queued remote events.
|
boolean |
isClient()
Checks if this is a client or not.
|
boolean |
isServer()
Checks if this is a server or not.
|
void |
processRemoveEvent(Transaction trans)
Process the TRANS_REMOTE_EVENT transaction.
|
void |
processUpdateTrans(PropCnr root,
Transaction trans)
Processes the TRANS_UPDATE transaction on a root property container.
|
void |
queueEvent(GEvent event)
Queues a property event during update of the property tree from the remote party
until the entire tree has been updated.
|
void |
queueRemoteEvent(RemoteEvent event)
Queues a property event during update of the property tree from the remote party
until the entire tree has been updated.
|
void |
readPropMgrData(Transaction trans)
Reads property manager data from a transaction.
|
void |
reinitialize()
Reinitializes the manager for a reconnection.
|
void |
setOwner(IPropMgrOwner owner)
Sets the owner Object, can only be done once.
|
void |
setProvider(IPropMgrInfoProvider provider)
Sets the information provider for the Property Manager.
|
void |
trace(GProp<?> originator,
String text)
Traces a line of data.
|
boolean |
useWebSocketBinaryFrameCompression()
Checks if Binary Frame Compression should be used.
|
public static final int CLIENT
public static final int SERVER
public static final int EDITOR
public void setOwner(IPropMgrOwner owner)
owner
- The owner object.IllegalStateException
- If called more than once.NullPointerException
- If owner is null.public IPropMgrOwner getOwner()
public void processUpdateTrans(PropCnr root, Transaction trans)
root
- The root property container.trans
- The create transaction.public void processRemoveEvent(Transaction trans)
public void queueRemoteEvent(RemoteEvent event)
dispatchEvents()
is called.public boolean hasRemoteEventTrans()
public void queueEvent(GEvent event)
dispatchEvents()
is called.event
- Event to queue.public Transaction getSendTransaction(ITransactionCreator transCreator)
transCreator
- The transaction creator instance.public void dispatchEvents()
public void trace(GProp<?> originator, String text)
originator
- the originating property or null for none.text
- the text to write to the trace output.public boolean hasJavaScriptClient()
public boolean isClient()
public boolean isServer()
public int getType()
public boolean useWebSocketBinaryFrameCompression()
public boolean areNewAtomsPresent()
public void appendPropMgrData(Transaction trans)
trans
- the transaction to the data append to.public void readPropMgrData(Transaction trans)
trans
- the transaction to read property manager data from.public ClientProps createRootContainer(Transaction trans, IModuleProjectPropProvider modulePropProvider)
trans
- The create transaction.public ClientProps createClientRootContainer(IModuleProjectPropProvider modulePropProvider)
public ClientProps getRootContainer()
createRootContainer()
.public void reinitialize()
public EnvProps getEnvironment()
public StringMapProp getClientEnv()
public void setProvider(IPropMgrInfoProvider provider)
provider
- The provider, non-null.NullPointerException
- If provider
is null.IllegalStateException
- If the provider already is initialized.public IPropMgrInfoProvider getProvider()
iizi® is a registered trademark of Mindus SARL. © Copyright 2019 Mindus SARL. All rights reserved.