Versions Compared

Key

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

...

  • AbstractTask.start(TaskContext) because the method was not declared in the Task interface.
  • RecoverableTaskAdapter.start(TaskContext) because the method was not declared in the TaskinterfaceTask interface.
  • RecoverableTaskAdapter.recover(RecoverableTaskContext) because the method was not declared in the Task interface.

...

  • AbstractTask.start(TaskContext) because the method was not declared in the Task interface.
  • AbstractTask.stop() because the method does not match the specified signature of (boolean).
  • RecoverableTaskAdapter.start(TaskContext) because the method was not declared in the TaskinterfaceTask interface.
  • RecoverableTaskAdapter.recover(RecoverableTaskContext) because the method was not declared in the Task interface.
  • RecoverableTaskAdapter.stop() because the method does not match the specified signature of (boolean). See About method signature matching.

...

Wildcards can be used in the <name> element. This instrumenter configuration file causes instrumentation to be applied to the start() and stop() methods of abstract and concrete classes that implement the Task interface.

<?xml version='1.0'?>
<instrumenter-config>
     <custom-config>
          <java-classes>
               <java-class>
                    <class-name> xmp.wfm.task.Task </class-name>
                    <methods>
                         <method>
                              <name> s* </name>
                              <params> <params/>
                         </method>
                    </methods>
               </java-class>
          </java-classes>
     </custom-config>
</instrumenter-config>

When wildcards are used in the <name> element and the matching construct is an interface, instrumentation is applied to methods of abstract and concrete classes that satisfy the following criteria:•    The

  • The name of the method matches the wildcard pattern that is specified in the <name> element.

...

  • The signature of the method matches the signature that is specified in the <params> element (if present).
    Specifying empty <params> </params> elements indicates that methods with zero arguments are matched, as in a signature of (). If <params> </params> is omitted, all signatures are matched.

...

  • The method is declared in the matched interface.

Based on these rules, custom-type instrumentation is applied to the following methods:•    AbstractTask

  • AbstractTask.start()

...

  • AbstractTask.stop()

...

  • RecoverableTaskAdapter.start()

...

  • RecoverableTaskAdapter.stop()

However, instrumentation is not applied to the following methods:•    AbstractTask

  • AbstractTask.start(TaskContext) because the method was not declared in the Task interface.

...

  • AbstractTask.stop(boolean) because the method does not match the specified signature of ().

...

  • RecoverableTaskAdapter.start(TaskContext) because the method was not declared in the Task interface.

...

  • RecoverableTaskAdapter.recover(RecoverableTaskContext) because the method name does not match the wildcard pattern.

...

  • RecoverableTaskAdapter.stop(boolean) because the method does not match the signature of ().
About extending instrumentation to methods that are declared in extending interfaces

...