本文整理匯總了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);
}