本文整理汇总了Java中org.cybergarage.upnp.control.ActionListener类的典型用法代码示例。如果您正苦于以下问题:Java ActionListener类的具体用法?Java ActionListener怎么用?Java ActionListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ActionListener类属于org.cybergarage.upnp.control包,在下文中一共展示了ActionListener类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: setActionListener
import org.cybergarage.upnp.control.ActionListener; //导入依赖的package包/类
public void setActionListener(ActionListener listener)
{
ServiceList serviceList = getServiceList();
int nServices = serviceList.size();
for (int n=0; n<nServices; n++) {
Service service = serviceList.getService(n);
service.setActionListener(listener);
}
}
示例4: setActionListener
import org.cybergarage.upnp.control.ActionListener; //导入依赖的package包/类
public void setActionListener(ActionListener listener)
{
ActionList actionList = getActionList();
int nActions = actionList.size();
for (int n=0; n<nActions; n++) {
Action action = actionList.getAction(n);
action.setActionListener(listener);
}
}
示例5: setActionListener
import org.cybergarage.upnp.control.ActionListener; //导入依赖的package包/类
public void setActionListener(ActionListener listener) {
ServiceList serviceList = getServiceList();
int nServices = serviceList.size();
for (int n = 0; n < nServices; n++) {
Service service = serviceList.getService(n);
service.setActionListener(listener);
}
}
示例6: setActionListener
import org.cybergarage.upnp.control.ActionListener; //导入依赖的package包/类
public void setActionListener(ActionListener listener) {
this.actionListener = listener;
}
示例7: getActionListener
import org.cybergarage.upnp.control.ActionListener; //导入依赖的package包/类
public ActionListener getActionListener() {
return this.actionListener;
}
示例8: 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;
}
示例9: getActionListener
import org.cybergarage.upnp.control.ActionListener; //导入依赖的package包/类
public ActionListener getActionListener()
{
return getActionData().getActionListener();
}
示例10: setActionListener
import org.cybergarage.upnp.control.ActionListener; //导入依赖的package包/类
public void setActionListener(ActionListener listener)
{
getActionData().setActionListener(listener);
}