Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
def objName = new ObjectName("jmx.tutorial:type=Object")
def beans = jmx.export {
    bean(
        target: new RequestController(),
        name: objName,
        attributes: [
            "Resource":[desc: "The resource to request.", readable: true, writeablewritable: true, defaultValue:"Hello"],
            "RequestCount":"*"
        ]
    )
}

...

Code Block
jmx.export {
    bean(
        target: new RequestController(), name: "jmx.tutorial:type=Object",
        attributes: [
            "Resource":[
                readable: true, writeablewritable: true,
                onChange:{e ->
                    println e.oldValue
                    println e.newValue
                }
            ]
        ]
    )
}

...