<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">

<chapter>
  <header>
    <copyright>
      <year>2002</year><year>2009</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      The contents of this file are subject to the Erlang Public License,
      Version 1.1, (the "License"); you may not use this file except in
      compliance with the License. You should have received a copy of the
      Erlang Public License along with this software. If not, it can be
      retrieved online at http://www.erlang.org/.
    
      Software distributed under the License is distributed on an "AS IS"
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
      the License for the specific language governing rights and limitations
      under the License.
    
    </legalnotice>

    <title>Quality Of Service and Admin Properties</title>
    <prepared></prepared>
    <docno></docno>
    <date>2000-05-29</date>
    <rev></rev>
    <file>ch_QoS.xml</file>
  </header>

  <section>
    <title>Quality Of Service and Admin Properties</title>
    <p>This chapter explains the allowed properties it is possible to set for this
      application. </p>

    <section>
      <title>Quality Of Service</title>
      <p>The cosEventDomain application supports the following QoS settings:</p>
      <table>
        <row>
          <cell align="center" valign="middle"><em>QoS</em></cell>
          <cell align="center" valign="middle"><em>Range</em></cell>
          <cell align="center" valign="middle"><em>Default</em></cell>
        </row>
        <row>
          <cell align="left" valign="middle">CycleDetection</cell>
          <cell align="left" valign="middle">AuthorizeCycles/ForbidCycles</cell>
          <cell align="left" valign="middle">ForbidCycles</cell>
        </row>
        <row>
          <cell align="left" valign="middle">DiamondDetection</cell>
          <cell align="left" valign="middle">AuthorizeDiamonds/ForbidDiamonds</cell>
          <cell align="left" valign="middle">ForbidDiamonds</cell>
        </row>
        <tcaption>Supported QoS settings</tcaption>
      </table>
<br></br><br></br><br></br><br></br>      <p><em>Comments on the table 'Supported QoS Settings':</em></p>
      <taglist>
        <tag><em>CycleDetection</em></tag>
        <item>If a cycle is created, the user <em>must</em> be aware of the fact
         that unless they set timeout on events, events that are not filtered
         will loop endlessly through the topology.</item>
        <tag><em>DiamondDetection</em></tag>
        <item>A Diamond in this context, means that the same
         event may reach a point in the graph by more than one route 
         (i.e. transitive). Hence, it is possible that multiple copies
         are delivered.</item>
      </taglist>
    </section>

    <section>
      <title>Setting Quality Of Service</title>
      <p>Assume we have a Consumer Admin object which we want to change
        the current Quality of Service. Typical usage:</p>
      <code type="none"><![CDATA[
QoS = 
   [#'CosNotification_Property'
    {name='CosEventDomainAdmin':'DiamondDetection'(), 
     value=any:create(orber_tc:short(),
     'CosEventDomainAdmin':'AuthorizeDiamonds'())},
    #'CosNotification_Property'
    {name='CosEventDomainAdmin':'CycleDetection'(), 
     value=any:create(orber_tc:short(),
     'CosEventDomainAdmin':'ForbidCycles'())}],
'CosEventDomainAdmin_EventDomain':set_qos(ED, QoS),
      ]]></code>
      <p>If it is not possible to set the requested QoS the <c><![CDATA[UnsupportedQoS]]></c>
        exception is raised, which includes a sequence of <c><![CDATA[PropertyError]]></c>'s
        describing which QoS, possible range and why is not allowed. The error
        codes are:</p>
      <list type="bulleted">
        <item>UNSUPPORTED_PROPERTY - QoS not supported for this type of target object.</item>
        <item>UNAVAILABLE_PROPERTY - due to current QoS settings the given property
         is not allowed.</item>
        <item>UNSUPPORTED_VALUE - property value out of range; valid range is returned.</item>
        <item>UNAVAILABLE_VALUE - due to current QoS settings the given value is
         not allowed; valid range is returned.</item>
        <item>BAD_PROPERTY - unrecognized property.</item>
        <item>BAD_TYPE - type of supplied property is incorrect.</item>
        <item>BAD_VALUE - illegal value.</item>
      </list>
      <p>The CosEventDomainAdmin_EventDomain interface also supports an operation
        called <c><![CDATA[validate_qos/2]]></c>. The purpose of this operations is to check
        if a QoS setting is supported by the target object and if so, the operation
        returns additional properties which could be optionally added as well.</p>
    </section>

    <section>
      <title>Admin Properties</title>
      <p>The OMG specification do not contain any definitions of Admin Properties.
        Hence, the cosEventDomain application currently does not support any Admin
        Properties.</p>
    </section>
  </section>
</chapter>

