All Downloads are FREE. Search and download functionalities are using the official Maven repository.

at.spardat.xma.monitoring.IMonitoring Maven / Gradle / Ivy

/*******************************************************************************
 * Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH .
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     s IT Solutions AT Spardat GmbH - initial API and implementation
 *******************************************************************************/

/*
 * @(#) $Id: IMonitoring.java 2089 2007-11-28 13:56:13Z s3460 $
 *
 * 
 * 
 * 
 *
 */
package at.spardat.xma.monitoring;

/**
 * Interface used by the runtime to report time measurements of RPC executions.
 * To get these measurements into your monitoring system, do the following:
 * 
  1. Write a class implementing this interface, that reports the information to your monitoring system
  2. *
  3. Configure the plugin by adding the following line to the xma-app.xml files of your XMA-applications.
    * <plugin-impl implements="at.spardat.xma.monitoring.IMonitoring" implServer="<YourClassName>" />
    *
* * @author s2877 */ public interface IMonitoring { /** * Report the start of a timing. * @param varName The name of the variable to observe. The runtime uses names like * env<p>:server<listits1m4vm1>:app<listit>:rpcServerEnter * @return a reference to the measurement, that must be passed with {@link #endTiming(Object, boolean)}. */ public Object startTiming(String varName); /** * Report the end of a timing. If this method is called more than once for the same event object, only * the first call defines the duration and success status. Additional calls for the same event object must * be ignored by the monitoring plugin. * @param event the object returned by the corresponding call to {@link #startTiming(String)} of the measurement. * @param success The runtime reports if the measured operation completet without errors in this parameter. * If the measured operation resulted in an exception false is passed here. */ public void endTiming(Object event,boolean success); /** * Report the observerd value of a parameter. * @param varName The name of the observed variable. * @param value The numeric value of the parameter to report. * @param success Indicates if the observation should be reported as success or error. */ public void reportValue(String varName,int value, boolean success); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy