|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.util.functions.FunctionProvider
org.mmbase.module.core.MMTable
org.mmbase.module.core.MMObjectBuilder
org.mmbase.module.builders.Vwms
public class Vwms
Virtual WebMasterS (VWMS) are agents within MMBase.
To be able to start a VWMS the following things have to be done:
- Create a VWMS that does the work
- Start the VWMS in the VWMS-Builder.
- Make a relation from the Vwm object to a MMserver.
- start the VWMS-Builder if it isn't already running.
In the Vwms builder you have to insert the following information:
Name: name of the Vwm
Machine: machine on which the VwmM is running (wanted_cpu)
Maintenance_Time: This is the interval time in which the Vwm is invoked
State: inactive means Vwm is off. active means Vwm is on.
Description: just a description
ClassName: the classname of the actual VWM that is performing the task.
Note that currently, vwms are only started during startup.
| Field Summary | |
|---|---|
static int |
STATUS_ACTIVE
Status value for a VWM that it is active |
static int |
STATUS_INACTIVE
Status value for a VWM that it is inactive |
static int |
STATUS_REFRESH
Status value for a VWM that it is being refreshed (?) |
(package private) Hashtable<String,VwmInterface> |
vwm_cache
Cache of VWMs, by name. |
| Fields inherited from class org.mmbase.module.core.MMObjectBuilder |
|---|
AGE_PARAMETERS, broadCastChanges, DEFAULT_ALINEA, DEFAULT_EOL, description, descriptions, EVENT_TYPE_LOCAL, EVENT_TYPE_REMOTE, FIELD_NUMBER, FIELD_OBJECT_TYPE, FIELD_OWNER, fields, genericBlobCache, getFunctions, GUI_INDICATOR, GUI_PARAMETERS, guiFunction, infoFunction, internalVersion, nodeCache, oType, pluralNames, searchAge, singularNames, SYSTEM_OWNER, TEMPNODE_DEFAULT_SIZE, TMP_FIELD_EXISTS, TMP_FIELD_NUMBER, virtual, WRAP_PARAMETERS, wrapFunction |
| Fields inherited from class org.mmbase.module.core.MMTable |
|---|
maxNodesFromQuery, mmb, storageConnector, tableName |
| Fields inherited from class org.mmbase.util.functions.FunctionProvider |
|---|
functions |
| Constructor Summary | |
|---|---|
Vwms()
|
|
| Method Summary | |
|---|---|
String |
getGUIIndicator(String field,
MMObjectNode node)
Returns gui information for a field. |
VwmInterface |
getVwm(String vwmname)
Retrieve a currently active vwm by name. |
boolean |
init()
Initializes the vwms builder. |
boolean |
nodeLocalChanged(String machine,
String number,
String builder,
String ctype)
Passes a local change of a vwms node to the appropriate (active) vwm. |
boolean |
nodeRemoteChanged(String machine,
String number,
String builder,
String ctype)
Passes a remote change of a vwms node to the appropriate (active) vwm. |
boolean |
putTask(String vwmname,
MMObjectNode node)
Passes a task to a vwm. |
boolean |
sendMail(String who,
String subject,
String msg)
Send mail, using this builder's email settings. |
boolean |
sendMail(String who,
String to,
String subject,
String msg)
Send mail, using this builder's email settings. |
void |
startVwms()
Starts all vwms whose 'entries are related to the current server (entry in mmservers), and that are marked as 'active'. |
void |
startVwmsByField()
Deprecated. Unused. Use startVwms() instead. |
| Methods inherited from class org.mmbase.module.core.MMTable |
|---|
count, count, created, getFullTableName, getMMBase, getNode, getNodes, getNodes, getNodes, getNodeType, getStorageConnector, getTableName, search, searchVector, setMMBase, setTableName, size |
| Methods inherited from class org.mmbase.util.functions.FunctionProvider |
|---|
addFunction, createParameters, getFunction, getFunctions, getFunctionValue |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int STATUS_INACTIVE
public static final int STATUS_ACTIVE
public static final int STATUS_REFRESH
Hashtable<String,VwmInterface> vwm_cache
| Constructor Detail |
|---|
public Vwms()
| Method Detail |
|---|
public boolean init()
sendMail(java.lang.String, java.lang.String, java.lang.String) method.
init in class MMObjectBuilderMMObjectBuilder.create()
public String getGUIIndicator(String field,
MMObjectNode node)
getGUIIndicator in class MMObjectBuildernode - The node to displayfield - the name field of the field to display
String, null if not specifiedpublic void startVwmsByField()
public void startVwms()
public boolean putTask(String vwmname,
MMObjectNode node)
vwmname - the name of the vwm to pass the tasknode - the node to apss as a task
true if the task was passed, false if the vwm did not exist.
public boolean sendMail(String who,
String subject,
String msg)
who - email address (?) of the sendersubject - subject of the messagemsg - the message itself
true if the mail was send, false otherwise
public boolean sendMail(String who,
String to,
String subject,
String msg)
who - email address (?) of the senderto - email address of the receiversubject - subject of the messagemsg - the message itself
true if the mail was send, false otherwisepublic VwmInterface getVwm(String vwmname)
vwmname - the name of the vwm to retrieve
public boolean nodeRemoteChanged(String machine,
String number,
String builder,
String ctype)
nodeRemoteChanged in interface MMBaseObservernodeRemoteChanged in class MMObjectBuildermachine - Name of the machine that changed the node.number - Number of the changed node as a Stringbuilder - type of the changed nodectype - command type, not very well documented
true
public boolean nodeLocalChanged(String machine,
String number,
String builder,
String ctype)
nodeLocalChanged in interface MMBaseObservernodeLocalChanged in class MMObjectBuildermachine - Name of the machine that changed the node.number - Number of the changed node as a Stringbuilder - type of the changed nodectype - command type, not very well documented
true
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||