Previous Topic: Protocol Weight ConfigurationNext Topic: Instrumentation Rules for VSE


Signature Specification

The following directives in the rules.xml file include a signature specification:

You use the signature specification to describe the characteristics of a Java method signature.

The first portion of the specification is the word signature, followed by an equal sign and a quotation mark.

The second portion of the specification contains the arguments, surrounded by parentheses. If the method has no arguments, you must still include the parentheses.

The third portion of the specification contains the return type, followed by a quotation mark. If the return type is void, use the letter V.

Do not include any spaces within the specification.

To specify a primitive type in the arguments or the return type, use one of the following letters:

 

Letter

Primitive Type

Z

boolean

B

byte

C

char

D

double

F

float

I

int

J

long

S

short

To specify a fully qualified class, do the following steps:

For example:

Ljava/lang/String;

 

Example: One Argument, Returns Void

Assume that you want to intercept the onMessage() method of the javax.jms.MessageListener interface. This method has the following signature:

The signature specification in the intercept rule would be:

signature="(Ljavax/jms/Message;)V"

 

Example: No Arguments, Returns Primitive Type

Assume that you want to intercept the getPriority() method of the javax.jms.MessageProducer interface. This method has the following signature:

The signature specification in the intercept rule would be:

signature="()I"