本文整理汇总了Java中org.cybergarage.upnp.control.ActionListener.actionControlReceived方法的典型用法代码示例。如果您正苦于以下问题:Java ActionListener.actionControlReceived方法的具体用法?Java ActionListener.actionControlReceived怎么用?Java ActionListener.actionControlReceived使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.cybergarage.upnp.control.ActionListener
的用法示例。
在下文中一共展示了ActionListener.actionControlReceived方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: performActionListener
import org.cybergarage.upnp.control.ActionListener; //导入方法依赖的package包/类
public boolean performActionListener(ActionRequest actionReq)
{
ActionListener listener = (ActionListener)getActionListener();
if (listener == null)
return false;
ActionResponse actionRes = new ActionResponse();
setStatus(UPnPStatus.INVALID_ACTION);
clearOutputAgumentValues();
if (listener.actionControlReceived(this) == true) {
actionRes.setResponse(this);
}
else {
UPnPStatus upnpStatus = getStatus();
actionRes.setFaultResponse(upnpStatus.getCode(), upnpStatus.getDescription());
}
if (Debug.isOn() == true)
actionRes.print();
actionReq.post(actionRes);
return true;
}
示例2: actionControlReceived
import org.cybergarage.upnp.control.ActionListener; //导入方法依赖的package包/类
public boolean actionControlReceived(Action action) {
if (action.getName() == null) {
return false;
}
MediaRenderer dmr = getMediaRenderer();
if (dmr == null) {
return false;
}
ActionListener listener = dmr.getActionListener();
if (listener == null) {
return false;
}
listener.actionControlReceived(action);
return false;
}
示例3: actionControlReceived
import org.cybergarage.upnp.control.ActionListener; //导入方法依赖的package包/类
public boolean actionControlReceived(Action action) {
String actionName = action.getName();
if (actionName == null) {
return false;
}
boolean isActionSuccess = false;
if (actionName.equals(SETAVTRANSPORTURI)) {
AVTransportInfo avTransInfo = new AVTransportInfo();
avTransInfo.setInstanceID(action.getArgument("InstanceID").getIntegerValue());
avTransInfo.setURI(action.getArgument(CURRENTURI).getValue());
avTransInfo.setURIMetaData(action.getArgument(CURRENTURIMETADATA).getValue());
setCurrentAvTransInfo(avTransInfo);
isActionSuccess = true;
}
if (actionName.equals(SETNEXTAVTRANSPORTURI)) {
avTransInfo = new AVTransportInfo();
avTransInfo.setInstanceID(action.getArgument("InstanceID").getIntegerValue());
avTransInfo.setURI(action.getArgument(NEXTURI).getValue());
avTransInfo.setURIMetaData(action.getArgument(NEXTURIMETADATA).getValue());
setNextAvTransInfo(avTransInfo);
isActionSuccess = true;
}
if (actionName.equals(GETMEDIAINFO)) {
int instanceID = action.getArgument("InstanceID").getIntegerValue();
synchronized (this.avTransInfoList) {
int avTransInfoCnt = this.avTransInfoList.size();
for (int n = 0; n < avTransInfoCnt; n++) {
avTransInfo = this.avTransInfoList.getAVTransportInfo(n);
if (avTransInfo != null && avTransInfo.getInstanceID() == instanceID) {
action.getArgument(CURRENTURI).setValue(avTransInfo.getURI());
action.getArgument(CURRENTURIMETADATA).setValue(avTransInfo.getURIMetaData());
}
}
}
return false;
}
if (actionName.equals(PLAY)) {
instanceID = action.getArgument("InstanceID").getIntegerValue();
int speed = action.getArgument(SPEED).getIntegerValue();
isActionSuccess = true;
}
if (actionName.equals(STOP)) {
instanceID = action.getArgument("InstanceID").getIntegerValue();
isActionSuccess = true;
}
if (actionName.equals(PAUSE)) {
instanceID = action.getArgument("InstanceID").getIntegerValue();
isActionSuccess = true;
}
MediaRenderer dmr = getMediaRenderer();
if (dmr == null) {
return isActionSuccess;
}
ActionListener listener = dmr.getActionListener();
if (listener == null) {
return isActionSuccess;
}
listener.actionControlReceived(action);
return isActionSuccess;
}