InvocationHandler used for proxying Jakarta MessageProducer.
Each invocation to a send* method is intercepted and a
dedicated observation is
created. This instrumentation also creates an Observation. to propagate
the observation context and tracing information to the message broker.
| Modifier and Type | Field and Description |
|---|---|
| private static final JmsPublishObservationConvention | |
| private final ObservationRegistry | |
| private final MessageProducer |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private Message | |
| public Object | invoke(Object
the proxy instance that the method was invoked on proxy, Method the method, Object[] Method instance corresponding to
the interface method invoked on the proxy instance. The declaring
class of the Method object will be the interface that
the method was declared in, which may be a superinterface of the
proxy interface that the proxy class inherits the method through.an array of objects containing the values of the
arguments passed in the method invocation on the proxy instance,
or args)null if interface method takes no arguments.
Arguments of primitive types are wrapped in instances of the
appropriate primitive wrapper class, such as
java.lang.Integer or java.lang.Boolean.Implements java. Processes a method invocation on a proxy instance and returns the result. |
| DEFAULT_CONVENTION | back to summary |
|---|---|
| private static final JmsPublishObservationConvention DEFAULT_CONVENTION | |
| registry | back to summary |
|---|---|
| private final ObservationRegistry registry | |
| target | back to summary |
|---|---|
| private final MessageProducer target | |
| MessageProducerInvocationHandler | back to summary |
|---|---|
| pack-priv MessageProducerInvocationHandler(MessageProducer target, ObservationRegistry registry) | |
| findMessageArgument | back to summary |
|---|---|
private Message findMessageArgument(Object[] args)
| |
| invoke | back to summary |
|---|---|
| public Object invoke(Object proxy, Method method, Object[] args) throws Throwable Implements java. Doc from java. Processes a method invocation on a proxy instance and returns the result. This method will be invoked on an invocation handler when a method is invoked on a proxy instance that it is associated with.
| |