本文整理汇总了Java中org.teleal.cling.support.avtransport.callback.Pause类的典型用法代码示例。如果您正苦于以下问题:Java Pause类的具体用法?Java Pause怎么用?Java Pause使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Pause类属于org.teleal.cling.support.avtransport.callback包,在下文中一共展示了Pause类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: pause
import org.teleal.cling.support.avtransport.callback.Pause; //导入依赖的package包/类
/**
* Pauses playback on current renderer.
*/
@Override
public void pause(final String sessionId) throws RemoteException {
mRps.mUpnpService.getControlPoint().execute(
new Pause(mRps.getService(mRps.mDevices.get(sessionId), "AVTransport")) {
@SuppressWarnings("rawtypes")
@Override
public void failure(ActionInvocation invocation,
UpnpResponse operation, String defaultMessage) {
Log.w(TAG, "Pause failed, trying stop: " + defaultMessage);
mRps.sendError("Pause failed, trying stop: " + defaultMessage);
// Sometimes stop works even though pause does not.
try {
stop(sessionId);
}
catch (RemoteException e) {
Log.w(TAG, "Calling stop failed", e);
mRps.sendError("Calling stop failed: " + e.toString());
}
}
});
}
示例2: pause
import org.teleal.cling.support.avtransport.callback.Pause; //导入依赖的package包/类
@Override
@SuppressWarnings("rawtypes")
public void pause() {
ActionCallback pauseAction = new Pause(avtService) {
@Override
public void failure(ActionInvocation arg0, UpnpResponse arg1, String arg2) {
logger.log(Level.SEVERE, "Pause failed: " + arg2);
}
};
controlPoint.execute(pauseAction);
}