|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.sandev.generator.GeneratorCommon
org.sandev.generator.FileGeneratorBase
org.sandev.generator.NodeStdMBeanGenerator
Writ a standard MBean for this node so we can control it at runtime.
| Field Summary |
| Fields inherited from class org.sandev.generator.GeneratorCommon |
CONTEXT_CONFIGURATION, CONTEXT_CONTROL, CONTEXT_FRAMEWORK, CONTEXT_MESSAGING, CONTEXT_PERSISTENCE, CONTEXT_UI, DEFAULT_LINE_LENGTH, MESSAGE_INTERFACES |
| Constructor Summary | |
NodeStdMBeanGenerator()
|
|
| Method Summary | |
void |
delete(org.sandev.sandbuild.SandDecl sd,
java.io.File baseDir,
java.lang.String extra)
Delete the standard MBean source files. |
protected boolean |
filterField(com.sun.javadoc.FieldDoc fd)
Return true if the control interface should ignore this field. |
protected java.lang.String |
getStdMBeanClass(com.sun.javadoc.ClassDoc cd)
Return the name of the standard MBean class |
protected java.lang.String |
getStdMBeanClassFile(org.sandev.sandbuild.SandDecl sd)
Return the name of the standard MBean class source file |
protected java.lang.String |
getStdMBeanInterface(com.sun.javadoc.ClassDoc cd)
Return the name of the standard MBean interface |
protected java.lang.String |
getStdMBeanInterfaceFile(org.sandev.sandbuild.SandDecl sd)
Return the name of the standard MBean interface source file |
void |
write(org.sandev.sandbuild.SandDecl sd,
java.io.File baseDir,
java.lang.String extra)
Write the standard MBean source files. |
void |
writeClass(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd)
Write the standard MBean class implementation |
void |
writeClassCtors(java.io.PrintStream out,
java.lang.String beanclass,
java.lang.String nodeclass)
Write constructors for the message |
void |
writeContainedNode(java.io.PrintStream out,
java.lang.String nodeclass)
Write the contained node. |
protected void |
writeControlAccMut(java.io.PrintStream out,
com.sun.javadoc.FieldDoc[] fields,
java.lang.String nodeclass,
boolean withcode)
Write the control access to the node. |
protected void |
writeControlAccMut(java.io.PrintStream out,
com.sun.javadoc.FieldDoc fd,
java.lang.String nodeclass,
boolean withcode)
Workhorse method to write the access for a single field. |
protected void |
writeControlWrapperImpl(java.io.PrintStream out,
java.lang.String nodeclass)
|
protected void |
writeInterface(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd)
Write the standard MBean interface |
void |
writeLogUtility(java.io.PrintStream out,
java.lang.String beanclass,
java.lang.String nodeclass)
Write the log utility method. |
protected void |
writeServiceOverrides(java.io.PrintStream out)
|
| Methods inherited from class org.sandev.generator.FileGeneratorBase |
cleanup, generate, trackFileWrite |
| Methods inherited from class org.sandev.generator.GeneratorCommon |
capitalize, copyfile, deletefile, filterHTMLLine, getDeclaredFields, getFields, getInheritanceHierarchy, getLastAppProject, getLastUtilDir, getLongInstanceName, getPrintStream, getSandProject, getShortInstanceName, getUtilPackage, getVisibleFields, isBasic, isLongReferenceArray, isMessageInterface, isParentAbstract, isPrimitive, isRootStruct, isVowel, log, nextToken, pluralize, rangeEscape, removePlatformDecls, trackFileDelete, uncapitalize, writeDefaultCtor, writeDescription, writeHTMLContents, writeMessageImports, writeSectionName, writeStandardCommentID, writeXHTMLFooter, writeXHTMLFooter, writeXHTMLHeader, writeXHTMLHeader |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.sandev.sandbuild.SandGenerator |
cleanup, generate |
| Constructor Detail |
public NodeStdMBeanGenerator()
| Method Detail |
public void write(org.sandev.sandbuild.SandDecl sd,
java.io.File baseDir,
java.lang.String extra)
throws org.sandev.sandbuild.SandGeneratorException
org.sandev.sandbuild.SandGeneratorException
public void delete(org.sandev.sandbuild.SandDecl sd,
java.io.File baseDir,
java.lang.String extra)
throws org.sandev.sandbuild.SandGeneratorException
org.sandev.sandbuild.SandGeneratorExceptionprotected java.lang.String getStdMBeanClassFile(org.sandev.sandbuild.SandDecl sd)
protected java.lang.String getStdMBeanClass(com.sun.javadoc.ClassDoc cd)
protected java.lang.String getStdMBeanInterfaceFile(org.sandev.sandbuild.SandDecl sd)
protected java.lang.String getStdMBeanInterface(com.sun.javadoc.ClassDoc cd)
public void writeClass(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd)
public void writeLogUtility(java.io.PrintStream out,
java.lang.String beanclass,
java.lang.String nodeclass)
public void writeClassCtors(java.io.PrintStream out,
java.lang.String beanclass,
java.lang.String nodeclass)
public void writeContainedNode(java.io.PrintStream out,
java.lang.String nodeclass)
protected void writeControlWrapperImpl(java.io.PrintStream out,
java.lang.String nodeclass)
protected void writeServiceOverrides(java.io.PrintStream out)
protected void writeInterface(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd)
protected void writeControlAccMut(java.io.PrintStream out,
com.sun.javadoc.FieldDoc[] fields,
java.lang.String nodeclass,
boolean withcode)
The control interface is a view of the nodes in the configuration while they are running. Things like the Logger and Messager are set for all the nodes in a config using the top level config settings which are part of the configuration rather than runtime control. The same is true for runtime access to the messaging configuration, which is left to the messaging technology implementation. The control interface is focused on the state of data elements in each node.
All declared config parameters have read/write access, and so do some generated fields like the log level. We want to provide the best information we can to make the resulting control panel useful, including some indication of enumeration values. This will change to adapt to the capabilities of the container control panel.
The line between control and configuration has some room for interpretation. Clearly things like a node logLevel (or other logging config parameters or some application-specific parameters) are meant to be modified while the app is running. And clearly things like messaging are best handled as a configuration update, even if this also happens at runtime. Updates to complex config structures like arrays or contained objects fall somewhere in the middle.
The current known requirements are starting/stopping nodes, viewing current node state information at a basic level, bumping log levels, and changing config flags in some apps. We are postponing arrays and other advanced control access until there is a compelling use case.
protected void writeControlAccMut(java.io.PrintStream out,
com.sun.javadoc.FieldDoc fd,
java.lang.String nodeclass,
boolean withcode)
protected boolean filterField(com.sun.javadoc.FieldDoc fd)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||