## org.jboss.ejb.plugins
Class MetricsInterceptor

    java.lang.Object
      |
      +--org.jboss.ejb.plugins.AbstractInterceptor
            |
            +--org.jboss.ejb.plugins.MetricsInterceptor

All Implemented Interfaces:
  ContainerPlugin, Interceptor, MetricsConstants, Service

public class MetricsInterceptor
extends AbstractInterceptor
implements MetricsConstants

MetricsInterceptor collects data from the bean invocation call and publishes them on a JMS topic (bound to `topic/metrics` in the name service).

Since:
  jBoss 2.0
Author:
  Juha Lindfors

Fields inherited from class org.jboss.ejb.plugins.AbstractInterceptor
`log, nextInterceptor`

Fields inherited from interface org.jboss.monitor.MetricsConstants
`ACTIVITY, APPLICATION, BEAN, BEANCACHE_METRICS, CHECKPOINT, INVOCATION_METRICS, MEMORY_MONITOR, METHOD, PRIMARY_KEY, SYSTEM_METRICS, THREAD_MONITOR, TIME, TYPE`

Constructor Summary
`MetricsInterceptor()`

Method Summary
`void` `destroy()` Kills the publisher thread.
`Container` `getContainer()` Returns the container reference.
`void` `init()` Starts the JMS publisher thread.
`java.lang.Object` `invoke(MethodInvocation mi)`
`java.lang.Object` `invokeHome(MethodInvocation mi)`
`void` `setContainer(Container container)` Stores the container reference and the application and bean JNDI names.

Methods inherited from class org.jboss.ejb.plugins.AbstractInterceptor
`getNext, setNext, start, stop`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MetricsInterceptor

    public MetricsInterceptor()

Method Detail

### setContainer

    public void setContainer(Container container)

  Stores the container reference and the application and bean JNDI names.
  Overrides:
    `setContainer` in class `AbstractInterceptor`
  Parameters:
    `container` - set by the container initialization code

### getContainer

    public Container getContainer()

  Returns the container reference.
  Overrides:
    `getContainer` in class `AbstractInterceptor`
  Returns:
    the container this interceptor belongs to

### invokeHome

    public java.lang.Object invokeHome(MethodInvocation mi)
                                throws java.lang.Exception

  Overrides:
    `invokeHome` in class `AbstractInterceptor`

### invoke

    public java.lang.Object invoke(MethodInvocation mi)
                            throws java.lang.Exception

  Overrides:
    `invoke` in class `AbstractInterceptor`

### init

    public void init()

  Starts the JMS publisher thread.
  Overrides:
    `init` in class `AbstractInterceptor`

### destroy

    public void destroy()

  Kills the publisher thread.
  Overrides:
    `destroy` in class `AbstractInterceptor`

Copyright © 2000 The JBoss Organization. All Rights Reserved.