本文整理汇总了Java中org.freedesktop.dbus.exceptions.DBusExecutionException类的典型用法代码示例。如果您正苦于以下问题:Java DBusExecutionException类的具体用法?Java DBusExecutionException怎么用?Java DBusExecutionException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DBusExecutionException类属于org.freedesktop.dbus.exceptions包,在下文中一共展示了DBusExecutionException类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: refresh
import org.freedesktop.dbus.exceptions.DBusExecutionException; //导入依赖的package包/类
public void refresh ()
{
try
{
m_info_helper.merge ( m_prop.GetAll ( MediaPlayer2.class.getCanonicalName () ) );
m_info_helper.merge ( m_prop.GetAll ( MediaPlayer2.Player.class.getCanonicalName () ) );
m_info_helper.merge ( m_prop.GetAll ( MediaPlayer2.Playlists.class.getCanonicalName () ) );
}
catch (DBusExecutionException dee)
{
dee.printStackTrace ();
}
finally
{
m_info_helper.refresh ();
}
}
示例2: handleDBusExecutionException
import org.freedesktop.dbus.exceptions.DBusExecutionException; //导入依赖的package包/类
private static void handleDBusExecutionException(DBusExecutionException e) {
System.err.println("Cannot connect to dbus: " + e.getMessage());
System.err.println("Aborting.");
}
示例3: getName
import org.freedesktop.dbus.exceptions.DBusExecutionException; //导入依赖的package包/类
/**
* Get the bluetooth device name.<br>
* This may fail if you not connected to the device, or if the device does not support this operation.<br>
* If no name could be retrieved, the alias will be used.<br><br>
*
* <b>From bluez Documentation:</b>
* <p>
* The Bluetooth remote name. This value can not be<br>
* changed. Use the Alias property instead.<br>
* This value is only present for completeness. It is<br>
* better to always use the Alias property when<br>
* displaying the devices name.<br>
* If the Alias property is unset, it will reflect<br>
* this value which makes it more convenient.
* </p>
* @return name, maybe null
*/
public String getName() {
String name = null;
try {
name = getTyped("Name", String.class);
} catch (DBusExecutionException _ex) {
}
if (name == null) {
name = getAlias();
}
return name;
}