当前位置: 首页>>代码示例>>Java>>正文


Java DBusExecutionException类代码示例

本文整理汇总了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 ();
    }
}
 
开发者ID:arfbtwn,项目名称:MPRIS2-Remote,代码行数:18,代码来源:PlayerWrapper.java

示例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.");
}
 
开发者ID:AsamK,项目名称:signal-cli,代码行数:5,代码来源:Main.java

示例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;
}
 
开发者ID:hypfvieh,项目名称:bluez-dbus,代码行数:30,代码来源:BluetoothDevice.java


注:本文中的org.freedesktop.dbus.exceptions.DBusExecutionException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。