<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PostalCode"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="State"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="Street"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="address"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="country-region"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I am (attempting) to write a Java D-Bus client that uses AbstractConnection.callWithCallback()
to asynchronously issue requests to a D-Bus service. This reason I am using
this method versus AbstractConnection.callMethodAsync() is that I want to be
notified (via the callback) when the reply is returned rather than wait (or
poll) for the response. I have successfully used this method to make requests
to services and received a response via the callback (e.g. it works as
advertised). What I want to understand is how to handle D-Bus error messages
returned instead of a response to a request. If I was issuing a blocking call
through the remote object’s interface I could put a try/catch block
around the request and “catch” the error message. With
callWithCallback() method there does not appear to be a mechanism to report
back any errors. Likewise, there does not appear to be a mechanism to either
cancel the request or specify a timeout on the request. So, to summarize, these
are my questions:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>1) How do I detect errors using callWithCallback()?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>2) Can I specify a timeout to wait for a response with
callWithCallback()?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>3) Can I cancel a request issued with callWithCallback()?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Thanks . . .<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
style='border-collapse:collapse'>
<tr>
<td width=62 valign=top style='width:.65in;border:none;border-bottom:solid silver 1.5pt;
padding:5.65pt 5.4pt 5.65pt 5.4pt'>
<p class=MsoNormal><font size=1 face=Arial><span style='font-size:8.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
</td>
<td width=253 colspan=2 valign=top style='width:189.9pt;border:none;
border-bottom:solid silver 1.5pt;padding:5.65pt 5.4pt 5.65pt 5.4pt'>
<p class=MsoNormal><font size=1 face="Times New Roman"><span
style='font-size:8.0pt'><img width=181 height=16 id="_x0000_i1025"
src="cid:image001.jpg@01CA719D.956886A0"></span></font><font size=1
face=Arial><span style='font-size:8.0pt;font-family:Arial'><o:p></o:p></span></font></p>
</td>
</tr>
<tr>
<td width=86 colspan=2 valign=top style='width:.9in;border:none;padding:5.65pt 5.4pt 5.65pt 5.4pt'>
<p class=MsoNormal><font size=3 color=black face=Arial><span
style='font-size:12.0pt;font-family:Arial;color:black'><o:p> </o:p></span></font></p>
</td>
<td width=229 valign=top style='width:171.9pt;border:none;padding:5.65pt 5.4pt 5.65pt 5.4pt'>
<p class=MsoNormal><font size=1 face=Arial><span style='font-size:1.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><st1:Street w:st="on"><st1:address w:st="on"><font size=1
face="Times New Roman"><span style='font-size:8.0pt'>39001 West 12 Mile
Road</span></font></st1:address></st1:Street><font size=1><span
style='font-size:8.0pt'><o:p></o:p></span></font></p>
<p class=MsoNormal><st1:place w:st="on"><st1:City w:st="on"><font size=1
face="Times New Roman"><span style='font-size:8.0pt'>Farmington Hills</span></font></st1:City><font
size=1><span style='font-size:8.0pt'>, <st1:State w:st="on">MI</st1:State> <st1:PostalCode
w:st="on">48331</st1:PostalCode>, <st1:country-region w:st="on">U.S.A.</st1:country-region></span></font></st1:place><font
size=1><span style='font-size:8.0pt'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Times New Roman"><span
style='font-size:8.0pt'>Phone: +1 248 592 3217</span></font><font size=2><span
style='font-size:10.0pt'><o:p></o:p></span></font></p>
<p class=MsoNormal><st1:City w:st="on"><st1:place w:st="on"><font size=1
face="Times New Roman"><span style='font-size:8.0pt'>Mobile</span></font></st1:place></st1:City><font
size=1><span style='font-size:8.0pt'>: +1 248 885 5864</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=1 face="Times New Roman"><span
style='font-size:8.0pt'>Fax: +1 248 994 2703<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Times New Roman"><span
style='font-size:8.0pt'>Email: <a
href="mailto:Glenn.Schmottlach@harmanbecker.com">Glenn.Schmottlach@harman.com</a><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Times New Roman"><span lang=DE
style='font-size:8.0pt'>Web: www.harman.com<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Times New Roman"><span lang=DE
style='font-size:8.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Times New Roman"><span lang=DE
style='font-size:8.0pt'>GLENN SCHMOTTLACH<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Times New Roman"><span
style='font-size:8.0pt'>Manager</span></font><font size=2><span
style='font-size:10.0pt'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face="Times New Roman"><span
style='font-size:8.0pt'>Electronic System Integration</span></font><o:p></o:p></p>
<p class=MsoNormal><font size=1 face="Times New Roman"><span
style='font-size:8.0pt'>Harman/Becker Automotive Systems<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 color=black face="Times New Roman"><span
style='font-size:8.0pt;color:black'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 color=black face="Times New Roman"><span
style='font-size:8.0pt;color:black'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=1 color=black face=Arial><span
style='font-size:8.0pt;font-family:Arial;color:black'><o:p> </o:p></span></font></p>
</td>
</tr>
<tr height=0>
<td width=62 style='border:none'></td>
<td width=24 style='border:none'></td>
<td width=229 style='border:none'></td>
</tr>
</table>
<p class=MsoNormal style='margin-right:-.25pt'><font size=1
face="Times New Roman"><span lang=NL style='font-size:8.0pt'>Confidentiality
Notice: This e-mail message, including any attachments, is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender by
return e-mail and destroy all copies of the original message.</span></font><font
size=1 face=Arial><span lang=NL style='font-size:8.0pt;font-family:Arial'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>