Since: API Level v2
public class

ConcurrentPlugin

com.webmbt.plugin.ConcurrentPlugin
Known Direct Subclasses

Class Overview

Concurrent plugin contains the mScript method implementation to support concurrent modeling.

Copyright © 2008 - 2017 TestOptimal LLC. All Rights Reserved.

Summary

Public Constructors
ConcurrentPlugin()
Public Methods
void activateState(String stateID_p, String modelName_p)
activates a specific state in the model currently executing in the same server, resulting in all transitions originating from the specified state to be dispatched for immediate execution.
void activateState(String stateID_p)
activates a specific state in the current model resulting in all transitions originating from the specified state to be dispatched for immediate execution.
String getPluginID()
Returns the plugin ID: Load.
boolean setAsyncTransThreadPoolSize(String threadPoolSize_p)
overrides the default AsyncTransThreadPoolSize setting from config.properties.
void setMaxAsyncTrans(String maxSize_p)
overrides the default MaxAsyncTrans setting from config.properties.
void triggerTrans(String stateID_p, String transID_p, String modelName_p)
triggers a specific transition in another model running in the same server, causing the immediate execution of the transition.
void triggerTrans(String stateID_p, String transID_p)
triggers a specific transition in the current model causing the immediate execution of the transition.

Public Constructors

public ConcurrentPlugin ()

Since: API Level v2

Public Methods

public void activateState (String stateID_p, String modelName_p)

Since: API Level v2

activates a specific state in the model currently executing in the same server, resulting in all transitions originating from the specified state to be dispatched for immediate execution. Any transitions with guard conditions must have guard conditions evaluated to true in order to participate in this operation.

Example: $activateState('state1', 'modelY')

Throws
MBTException

public void activateState (String stateID_p)

Since: API Level v2

activates a specific state in the current model resulting in all transitions originating from the specified state to be dispatched for immediate execution. Any transitions with guard conditions must have guard conditions evaluated to true in order to participate in this operation. Example: $activateState('state1')

Throws
Exception

public String getPluginID ()

Since: API Level v2

Returns the plugin ID: Load. Example: $getPluginID()

public boolean setAsyncTransThreadPoolSize (String threadPoolSize_p)

Since: API Level v2

overrides the default AsyncTransThreadPoolSize setting from config.properties. AsyncTransThreadPoolSize sets the maximum number of transitions to be allowed to execute at any time. Note more transitions are allowed to be dispatched up to MaxAsyncTrans set in config.propoerties. When there are maximum number of transitions executing, any transitions dispatched will be placed in the queue. MaxAsyncTrans defines the maximum number of transitions allowed in the queue.

Default value is 5.

Example: $setAsyncTransThreadPoolSize('10')

The above example overrides the maximum number of transitions to be executing at any time to 10.

public void setMaxAsyncTrans (String maxSize_p)

Since: API Level v2

overrides the default MaxAsyncTrans setting from config.properties. MaxAsyncTrans sets the maximum number of transitions allowed to be waiting for execution when there are already maximum number of transitions already executing.

Default value is 50.

Example: $setMaxAsyncTrans('100')

The above example overrides the maximum number of transitions allowed to wait for execution to 100.

public void triggerTrans (String stateID_p, String transID_p, String modelName_p)

Since: API Level v2

triggers a specific transition in another model running in the same server, causing the immediate execution of the transition. Guard conditions are not evaluated as part of this operation.

Example: $triggerTrans('state1', 'trans2', 'model2')

Throws
MBTException

public void triggerTrans (String stateID_p, String transID_p)

Since: API Level v2

triggers a specific transition in the current model causing the immediate execution of the transition. Guard conditions are not evaluated as part of this operation.

Example: $triggerTrans('state1', 'trans2')

Throws
Exception