<?xml version="1.0" encoding="UTF-8"?>
<!--
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - JASMINe
  - Copyright (C) 2011-2012 Bull S.A.S.
  - Contact: jasmine@ow2.org
  -
  - This library is free software; you can redistribute it and/or
  - modify it under the terms of the GNU Lesser General Public
  - License as published by the Free Software Foundation; either
  - version 2.1 of the License, or any later version.
  -
  - This library is distributed in the hope that it will be useful,
  - but WITHOUT ANY WARRANTY; without even the implied warranty of
  - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  - Lesser General Public License for more details.
  -
  - You should have received a copy of the GNU Lesser General Public
  - License along with this library; if not, write to the Free Software
  - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  - USA
  -
  -
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - $Id$
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<sect1 version="5.0" xml:lang="en" xml:id="jasmineprobe.output_create" xmlns="http://docbook.org/ns/docbook"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:xi="http://www.w3.org/2001/XInclude"
  xmlns:svg="http://www.w3.org/2000/svg"
  xmlns:mml="http://www.w3.org/1998/Math/MathML"
  xmlns:html="http://www.w3.org/1999/xhtml"
  xmlns:db="http://docbook.org/ns/docbook">

  <title>Output definition</title>

  <sect2>
    <title>Create an output</title>

    <para>
      In order to define an output, users have to specify:
      <itemizedlist>
       <listitem>
         <para><emphasis role="bold">name</emphasis>: a user defined name that uniquely identifies the output.</para>
       </listitem>
       <listitem>
         <para><emphasis role="bold">type</emphasis>: one of the available types depending on the current JASMINe Probe configuration.
         A management operation exists allowing to list the available types. The default configuration makes available all the output types described in the sections below. </para>
       </listitem>
       <listitem>
         <para><emphasis role="bold">default</emphasis>: if <emphasis>true</emphasis>, this output will be part of the default output list for probes with no explicitly defined output. Default value is  <emphasis>false</emphasis></para>
       </listitem>
       <listitem>
         <para><emphasis role="bold">properties</emphasis> that depend on the type.</para>
       </listitem>
     </itemizedlist>
    </para>

    <sect3>
    <title>
      Output types
    </title>

    <para>
      <itemizedlist>
       <listitem>
         <para><emphasis role="bold">console</emphasis>: outputs the indicator values to the console terminal,</para>
       </listitem>
       <listitem>
         <para><emphasis role="bold">file</emphasis>: saves the indicator values into a file,</para>
       </listitem>
       <listitem>
         <para><emphasis role="bold">mule</emphasis>: the indicator values are published into a JASMINe Monitor server's event bus (currently based on Mule).</para>
       </listitem>
     </itemizedlist>
    </para>

    <para>
      The list of the available output types,
      and the description of properties to be provided when defining an output of a given type, can be obtained using JASMINe Probe management operations (see <xref linkend="jasmineprobe.manage"/>).
    </para>
    </sect3>
  </sect2>

  <sect2>
    <title>Define a console output</title>
    <para>
      Users only have to provide a name to define a <emphasis role="bold">console</emphasis> output. No other parameters are required.
      The name can then be used in probes' definition to specify that indicator values are to be printed on the console terminal.
    </para>
     <para><emphasis role="bold">Examples:</emphasis></para>
     <screen>
  &lt;output name="stdio" type="console"&gt;
  &lt;/output&gt;
</screen>
  </sect2>

  <sect2>
    <title>Define a file output</title>
    <para>
      One property named <emphasis role="bold">path</emphasis> has to be defined for a <emphasis role="bold">file</emphasis> output.
      Its value gives the relative name, or a complete path for a file in which indicator values have to be saved.
    </para>

     <para><emphasis role="bold">Examples:</emphasis></para>
     <screen>
  &lt;output name="log1" type="file"&gt;
    &lt;property key="path" value="/tmp/log1.csv"/&gt;
  &lt;/output&gt;
</screen>

  </sect2>
  <sect2>
    <title>Define a mule output</title>
    <para>
      One property named <emphasis role="bold">url</emphasis> has to be defined for a <emphasis role="bold">mule</emphasis> output.
      Its value gives the address of the JASMINe Monitor server's event bus.
    </para>


     <para><emphasis role="bold">Examples:</emphasis></para>
     <screen>
  &lt;output name="eventswitch" type="mule"&gt;
    &lt;property key="url" value="tcp://localhost:18564/JProbe"/&gt;
  &lt;/output&gt;
</screen>
  </sect2>
</sect1>
