Skip to main content

[jsr361-experts] Re: How to use and extend Event

  • From: Volker Bauche < >
  • To:
  • Subject: [jsr361-experts] Re: How to use and extend Event
  • Date: Mon, 24 Mar 2014 19:53:36 +0100

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Werner, all<br>
      <br>
      sorry for the late reply, I was away for a private emergency end
      of last week.<br>
      In general, it is not intended to use the superclass methods on
      PowerStateEvent as the method owned by the class provide anything
      needed.<br>
      But of course they can be used, and what they return is well
      defined: it is the value of the event, in case of a
      PowerStateEvent this is the new state.<br>
      (Maybe I should make this more explicit in the spec, thanks).<br>
      The value is returned no matter whether you use getBoolean or
      getDouble or getInt - the way the value is converted into the
      requested type is described in the javax.microedition.event.Event
      class.<br>
      Means with getBoolean you cannot retrieve the "urgent" flag, as
      this is a PowerStateEvent specific information that can be
      retrieved using the isUrgent message.<br>
      <br>
      Hope this helps.<br>
      <br>
      Best regards -<br>
      Volker<br>
      <br>
      @Werner: Pls. feel free to communicate this to JSR-363, answering
      to the list as I have used does not include distributions of the
      requester,<br>
      so this answer goes to JSR-361 EG only (and is mirrored to the
      observers of course).<br>
      <br>
      Am 20.03.2014 14:13, schrieb Werner Keil:<br>
    </div>
    <blockquote
cite="mid:CAAGawe2y2+AEjgwCha3gWT8s2DN9-Oioi1wB=
      "
      type="cite">
      <div dir="ltr">
        <div>Dear Volker/all,</div>
        <div><br>
        </div>
        <div>As there are at least 2 possible use cases for the new MEEP
          Event, one if <b>JSR 350</b> (State Management) was
          applicable to ME/CLDC, too (the event model so far is based on
          CDI, but EG discussed fallback mechanisms based on other event
          systems), the other a more plausible usage by <b>JSR 363</b>
          (Unit API) where Sensor/Measurement events are required.</div>
        <div><br>
        </div>
        <div>JSR 356 (Sensor API for J2ME, now defunct) had a series of
          events it defined by its own, an approach we explicitely will
          leave out of JSR 363. Instead we plan to facilitate event
          models by either MEEP/CLDC or for SE/EE chose between either
          the SE style Event system or where better suited CDI events.</div>
        <div><br>
        </div>
        <div>The DataEvent in JSR 356 contained a so called Data class:&nbsp;<a
            moz-do-not-send="true"
href="http://developer.nokia.com/resources/library/Java/_zip/GUID-F031C633-5F4E-441E-A863-CE4E28A9CD55/javax/microedition/sensor/Data.html";>http://developer.nokia.com/resources/library/Java/_zip/GUID-F031C633-5F4E-441E-A863-CE4E28A9CD55/javax/microedition/sensor/Data.html</a></div>
        <div><br>
        </div>
        <div>Featuring a more array-like model of attributes not so
          different from MEEP Event:</div>
        <div><a moz-do-not-send="true"
href="http://docs.oracle.com/javame/config/cldc/opt-pkgs/api/meep/api/javax/microedition/event/Event.html";>http://docs.oracle.com/javame/config/cldc/opt-pkgs/api/meep/api/javax/microedition/event/Event.html</a><br>
        </div>
        <div><br>
        </div>
        <div>JSR 256 tried to cover things MEEP now defines by itself
          also in its set of Quantity strings:</div>
        <div><a moz-do-not-send="true"
href="http://developer.nokia.com/resources/library/Java/_zip/GUID-F031C633-5F4E-441E-A863-CE4E28A9CD55/javax/microedition/sensor/SensorInfo.html";>http://developer.nokia.com/resources/library/Java/_zip/GUID-F031C633-5F4E-441E-A863-CE4E28A9CD55/javax/microedition/sensor/SensorInfo.html</a></div>
        <div>Unlike the Quantity definition of JSR 363 which is
          typesafe, so e.g. "<span style="color:rgb(0,0,0)">length</span>"
          and "wind_speed" (a rather silly definition, the Speed of wind
          and a vehicle with a Java Embedded device or sensor on board
          would not differ<img
            src="cid:part4.04060008.07030004@oracle.com" goomoji="329"
            style="margin: 0px 0.2ex; vertical-align: middle;">) could
          not be mixed up.<br>
        </div>
        <div><br>
        </div>
        <div>If we went to define a MeasurementChangedEvent, then
          similar to PowerStateChangedEvent there would be e.g.
          "newMeasurement" and "prevMeasurement", but these shall be of
          type javax.measurement.Measurement, so could or should
          getValue() in that case represent that value, too, or simply
          wrap one of the primitive getters?</div>
        <div>These may return e.g. the int and doubleValue() of
          Quantity.getValue(), in case of the quantity type it's a
          Number, Measurement (see the wider scope of the "Data" class
          in JSR 256, or similar APIs interested parties like CERN have
          in mind) but it makes little sense to just return only the
          numeric value in such a case, it would contradict the idea of
          a typesafe Unit or Sensor API.</div>
        <div><br>
        </div>
        <div>It's not explicitly said by PowerStateEvent, what the
          getters on the superclass return.</div>
        <div>So does getBoolean() return the "urgent" flag while
          getDouble() or getInt() return a state (if so, which one, the
          old or new?<img src="cid:part5.04060901.02060603@oracle.com"
            goomoji="35F" style="margin: 0px 0.2ex; vertical-align:
            middle;">)</div>
        <div><br>
        </div>
        <div>I hope you get the point, and help not only the JSR 363 EG
          to better understand how to use and extend the MEEP Event. I
          copy the dev/EG alias for JSR 363, since it is an interesting
          question we may like to discuss further. If you are not
          subscribed to that list, just reply to me, I'd share your
          answer.</div>
        <div><br>
        </div>
        <div>Thanks,</div>
        <div class="gmail_extra"><br clear="all">
          <div>
            <div dir="ltr"><span style="font-family:arial,sans-serif">
                <p
                  style="margin:0px;font-size:13px;border-collapse:collapse"><span
style="color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;border-collapse:separate"><span
                      style="font-family:Helvetica"><span
                        style="font-family:Calibri;font-size:12px"></span></span></span></p>
                <div><font face="Arial"><span
                      style="font-family:arial,sans-serif">
                      <p
                        style="margin:0px;font-size:13px;border-collapse:collapse"><span
                          style="font-family:Calibri" lang="EN-US">Werner
                          Keil </span><span
                          style="font-family:arial,sans-serif"><font
                            face="Arial"><span
                              style="font-family:arial,sans-serif"><span
                                style="font-family:Calibri" lang="EN-US">|
                                <font face="Arial"><span
style="color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;border-collapse:separate"><span
style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><span
                                        style="font-family:Calibri"
                                        lang="EN-US">JCP Executive
                                        Committee Member, JSR 363 Co
                                        Spec Lead | Eclipse </span></span></span></font></span><span
                                style="font-family:arial,sans-serif"><font
                                  face="Arial"><span
                                    style="font-family:arial,sans-serif"><span
                                      style="font-family:Calibri"
                                      lang="EN-US"><font face="Arial"><span
style="color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal;border-collapse:separate"><span
style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><span
style="font-family:Calibri" lang="EN-US">UOMo Lead, Babel Language
                                              Champion</span></span></span></font></span></span></font></span></span></font></span><span
                          style="font-family:Calibri">&nbsp;</span><span
                          style="font-family:Calibri">| Apache Committer</span></p>
                    </span></font><font face="Arial"><span
                      style="font-family:arial,sans-serif">
                      <p
                        style="margin:0px;font-size:13px;border-collapse:collapse"><span
                          style="font-family:arial,sans-serif"><font
                            face="Arial"><span
                              style="font-family:arial,sans-serif"><span
style="font-family:Helvetica;font-size:medium;border-collapse:separate"><span
style="font-family:Calibri;font-size:12px">Twitter @wernerkeil </span></span><span
                                style="font-family:arial,sans-serif"><font
                                  face="Arial"><span
                                    style="font-family:arial,sans-serif"><span
style="font-family:Helvetica;font-size:medium;border-collapse:separate"><span
style="font-family:Calibri;font-size:12px"><span
                                          style="font-size:13px;border-collapse:collapse"></span>|</span></span></span></font></span></span></font></span><span
style="font-family:Helvetica;font-size:medium;border-collapse:separate"><span
                            style="font-family:Calibri;font-size:12px"><span
style="font-size:13px;border-collapse:collapse"></span>&nbsp;@UnitAPI |
                            @JSR354 | </span><span
                            style="font-family:Calibri;font-size:12px">#EclipseUOMo
                            |&nbsp;</span></span><span
                          style="font-family:Calibri;font-size:12px">#Java_Social
                          | #DevOps</span></p>
                    </span></font></div>
              </span><span lang="EN-GB">
                <div style="font-family:arial,helvetica,sans-serif"><span
                    style="font-family:arial,sans-serif"><font
                      face="Arial"><span
                        style="font-family:arial,sans-serif"><span
                          style="font-family:Helvetica;font-size:medium;border-collapse:separate"><span
                            style="font-family:Calibri;font-size:12px">Skype&nbsp;</span><span
                            style="font-family:Calibri;font-size:12px"><span
style="font-size:13px;border-collapse:collapse">werner.keil | Google+&nbsp;<a
                                moz-do-not-send="true"
                                href="http://gplus.to/wernerkeil";
                                target="_blank">gplus.to/wernerkeil</a><br>
                            </span></span></span></span></font></span></div>
                <div>
                  <div style="font-family:arial,sans-serif"><br>
                  </div>
                  <div style="font-family:arial,sans-serif"><span
                      style="font-size:small">*&nbsp;<span
                        style="background-color:rgb(255,255,255)">JavaLand</span>:
                      26 Mar 2014, Br&uuml;hl, Germany. Werner Keil, JCP EC
                      Member, JSR 354 EG Member, Apache DeviceMap
                      Committer will present "</span><font
                      color="#000000" face="Verdana"><span
                        style="font-size:12px">Apache DeviceMap</span></font><span
                      style="font-size:small">" (GER)</span><br>
                  </div>
                  <div style="font-family:arial,sans-serif"><span
                      style="font-size:small"><br>
                    </span></div>
                  <div><font>*&nbsp;Developer Week: 14 Jul 2014, N&uuml;rnberg,
                      Germany. Werner Keil, JCP EC Member, Agile Coach,
                      DevOps Guy will p<font face="arial, helvetica,
                        sans-serif">resent "</font><font face="arial,
                        helvetica, sans-serif"><span
                          style="color:rgb(0,0,0)">Triple-E' class
                          Continuous Delivery</span>" (GER)</font></font></div>
                </div>
              </span></div>
          </div>
          <br>
          <br>
          <div class="gmail_quote">On Wed, Mar 19, 2014 at 6:40 PM,
            volker bauche <span dir="ltr">&lt;<a moz-do-not-send="true"
                href="mailto:
      " target="_blank">
      </a>&gt;</span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
              <div text="#000000" bgcolor="#FFFFFF"> Hi Werner,<br>
                <br>
                thanks for careful reading :-)<br>
                <br>
                The line you refer to is in the history table and refers
                to a draft version from November, where I have updated
                the the spec with the outcome of of PR. I may remove the
                word "Speclead" and just call it "MEEP 8 Draft". And of
                course you are right, after it, the last line is missing
                mentioning the Proposed Final Draft itself, in which you
                have found this line. (The PFD is not identical with the
                draft version of Nov. 22)<br>
                <br>
                As for the XXX, yes, of course, I just forgot to update
                this. Will fix for the FAB of course.<br>
                <br>
                Best regards -<br>
                Volker
                <div>
                  <div class="h5"><br>
                    <br>
                    <div>On 19.03.2014 17:38, Werner Keil wrote:<br>
                    </div>
                    <blockquote type="cite">
                      <div dir="ltr">
                        <div>Volker/all,</div>
                        <div><br>
                        </div>
                        <div>I looked something up in the JavaDoc for
                          MEEP and came across 2 questions about the
                          Description page:&nbsp;<a moz-do-not-send="true"
href="http://docs.oracle.com/javame/config/cldc/opt-pkgs/api/meep/api/overview-summary.html#overview_description";
                            target="_blank">http://docs.oracle.com/javame/config/cldc/opt-pkgs/api/meep/api/overview-summary.html#overview_description</a></div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                        <div>
                          <table summary="Revision History"
style="color:rgb(53,56,51);font-family:Arial,Helvetica,sans-serif;font-size:12px"
                            cellpadding="1" border="1">
                            <tbody>
                              <tr>
                                <td rowspan="1" colspan="1">
                                  <p>22-November-2013</p>
                                </td>
                                <td rowspan="1" colspan="1">
                                  <p>MEEP 8 Speclead Draft</p>
                                </td>
                                <td rowspan="1" colspan="1">
                                  <p>Incorporates results of PR into PR
                                    version</p>
                                </td>
                              </tr>
                            </tbody>
                          </table>
                        </div>
                        <div><br>
                        </div>
                        <div>Is <b>Speclead Draft</b> correct in that
                          phase, or simply copied from the first line?</div>
                        <div><br>
                        </div>
                        <div>A little further under "Contributors" it
                          says</div>
                        <div><br>
                        </div>
                        <div><span
style="color:rgb(53,56,51);font-family:Arial,Helvetica,sans-serif;font-size:12px">&gt;This

                            specification was produced by the JSR XXX
                            Expert Group, as a part of the Java
                            Community Process. &gt;The following
                            companies and individuals, listed in
                            alphabetical order, are members of the
                            Expert Group :</span><br>
                        </div>
                        <div><br>
                        </div>
                        <div>Why <b>XXX</b>, I assume it was the
                          initial draft before it got a number, and
                          should say 361 now, right?</div>
                        <div><br>
                        </div>
                        <div>Thanks and Regards,</div>
                        <div><br>
                        </div>
                        <div>
                          <div dir="ltr"><span
                              style="font-family:arial,sans-serif">
                              <p
                                style="margin:0px;font-size:13px;border-collapse:collapse"><span
style="border-collapse:separate;text-indent:0px;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><span
                                    style="font-family:Helvetica"><span
style="font-family:Calibri;font-size:12px"></span></span></span></p>
                              <div><font face="Arial"><span
                                    style="font-family:arial,sans-serif">
                                    <p
                                      style="margin:0px;font-size:13px;border-collapse:collapse"><span
                                        style="font-family:Calibri"
                                        lang="EN-US">Werner Keil </span><span
style="font-family:arial,sans-serif"><font face="Arial"><span
                                            style="font-family:arial,sans-serif"><span
style="font-family:Calibri" lang="EN-US">| <font face="Arial"><span
style="border-collapse:separate;text-indent:0px;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><span
style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><span
style="font-family:Calibri" lang="EN-US">JCP Executive Committee Member,
                                                      JSR 363 Co Spec
                                                      Lead | Eclipse </span></span></span></font></span><span
style="font-family:arial,sans-serif"><font face="Arial"><span
                                                  style="font-family:arial,sans-serif"><span
style="font-family:Calibri" lang="EN-US"><font face="Arial"><span
style="border-collapse:separate;text-indent:0px;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px"><span
style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><span
style="font-family:Calibri" lang="EN-US">UOMo Lead, Babel Language
                                                          Champion</span></span></span></font></span></span></font></span></span></font></span><span
                                        style="font-family:Calibri">&nbsp;</span><span
                                        style="font-family:Calibri">|
                                        Apache Committer</span></p>
                                  </span></font><font face="Arial"><span
                                    style="font-family:arial,sans-serif">
                                    <p
                                      style="margin:0px;font-size:13px;border-collapse:collapse"><span
style="font-family:arial,sans-serif"><font face="Arial"><span
                                            style="font-family:arial,sans-serif"><span
style="font-family:Helvetica;font-size:medium;border-collapse:separate"><span
style="font-family:Calibri;font-size:12px">Twitter @wernerkeil </span></span><span
style="font-family:arial,sans-serif"><font face="Arial"><span
                                                  style="font-family:arial,sans-serif"><span
style="font-family:Helvetica;font-size:medium;border-collapse:separate"><span
style="font-family:Calibri;font-size:12px"><span
                                                        style="font-size:13px;border-collapse:collapse"></span>|</span></span></span></font></span></span></font></span><span
style="font-family:Helvetica;font-size:medium;border-collapse:separate"><span
style="font-family:Calibri;font-size:12px"><span
                                            style="font-size:13px;border-collapse:collapse"></span>&nbsp;@UnitAPI
                                          | @JSR354 | </span><span
                                          style="font-family:Calibri;font-size:12px">#EclipseUOMo

                                          |&nbsp;</span></span><span
                                        style="font-family:Calibri;font-size:12px">#Java_Social

                                        | #DevOps</span></p>
                                  </span></font></div>
                            </span><span lang="EN-GB">
                              <div
                                style="font-family:arial,helvetica,sans-serif"><span
                                  style="font-family:arial,sans-serif"><font
                                    face="Arial"><span
                                      style="font-family:arial,sans-serif"><span
style="font-family:Helvetica;font-size:medium;border-collapse:separate"><span
style="font-family:Calibri;font-size:12px">Skype&nbsp;</span><span
                                          style="font-family:Calibri;font-size:12px"><span
style="font-size:13px;border-collapse:collapse">werner.keil | Google+&nbsp;<a
                                              moz-do-not-send="true"
                                              href="http://gplus.to/wernerkeil";
                                              target="_blank">gplus.to/wernerkeil</a><br>
                                          </span></span></span></span></font></span></div>
                              <div>
                                <div
                                  style="font-family:arial,sans-serif"><br>
                                </div>
                                <div
                                  style="font-family:arial,sans-serif"><span
                                    style="font-size:small">*&nbsp;<span
                                      style="">JavaLand</span>: 26 Mar
                                    2014, Br&uuml;hl, Germany. Werner Keil,
                                    JCP EC Member, JSR 354 EG Member,
                                    Apache DeviceMap Committer will
                                    present "</span><font
                                    color="#000000" face="Verdana"><span
                                      style="font-size:12px">Apache
                                      DeviceMap</span></font><span
                                    style="font-size:small">" (GER)</span><br>
                                </div>
                                <div
                                  style="font-family:arial,sans-serif"><span
                                    style="font-size:small"><br>
                                  </span></div>
                                <div><font>*&nbsp;Developer Week: 14 Jul
                                    2014, N&uuml;rnberg, Germany. Werner
                                    Keil, JCP EC Member, Agile Coach,
                                    DevOps Guy will p<font face="arial,
                                      helvetica, sans-serif">resent "</font><font
                                      face="arial, helvetica,
                                      sans-serif"><span style="">Triple-E'
                                        class Continuous Delivery</span>"
                                      (GER)</font></font></div>
                              </div>
                            </span></div>
                        </div>
                      </div>
                    </blockquote>
                    <br>
                  </div>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>

Attachment: gifcfST2s6Yha.gif
Description: GIF image

Attachment: gifxhL_4dTu0J.gif
Description: GIF image



[jsr361-experts] How to use and extend Event

Werner Keil 03/20/2014

[jsr361-experts] Re: How to use and extend Event

Volker Bauche 03/24/2014

[jsr361-experts] Re: [jsr361-observers] Re: How to use and extend Event

Werner Keil 03/24/2014
 
 
Close
loading
Please Confirm
Close