org.ocap.hn.upnp.common
Interface UPnPAction


public interface UPnPAction

This interface represents the description of a UPnP service action, parsed from the UPnP service description XML. It contains both IN and OUT argument descriptions, but does not carry any values.


Method Summary
 String[] getArgumentNames()
          Gets the action argument names from the action description in the UPnP service description.
 String getName()
          Gets the name of the action from the action name element in the UPnP service description.
 UPnPStateVariable getRelatedStateVariable(String name)
          Gets the UPnP state variable associated with the specified argument name.
 UPnPService getService()
          Gets the UPnP service that this UPnPAction is associated with.
 boolean isInputArgument(String name)
          Gets the direction of an argument.
 boolean isRetval(String name)
          Determines whether the specified argument is flagged as a return value in the service description.
 

Method Detail

getName

String getName()
Gets the name of the action from the action name element in the UPnP service description.

Returns:
name of the action.

getArgumentNames

String[] getArgumentNames()
Gets the action argument names from the action description in the UPnP service description.

Returns:
The IN and OUT argument names for this action, in the order specified by the UPnP service description defining this action. If the action has no arguments, returns a zero length array.

isInputArgument

boolean isInputArgument(String name)
Gets the direction of an argument.

Parameters:
name - Name of the argument.
Returns:
True if the argument is an input argument.
Throws:
IllegalArgumentException - if the name does not represent a valid argument name for the action.

isRetval

boolean isRetval(String name)
Determines whether the specified argument is flagged as a return value in the service description.

Parameters:
name - Name of the argument.
Returns:
true if the argument is flagged as a retval.
Throws:
IllegalArgumentException - if the name does not represent a valid argument name for the action.

getService

UPnPService getService()
Gets the UPnP service that this UPnPAction is associated with. The returned UPnPService object may be cast to a UPnPManagedService by server applications, or to a UPnPClientService by client applications.

Returns:
The UPnP service that this action is associated with.

getRelatedStateVariable

UPnPStateVariable getRelatedStateVariable(String name)
Gets the UPnP state variable associated with the specified argument name. The returned UPnPStateVariable object may be cast to a UPnPManagedStateVariable by server applications, or to a UPnPClientStateVariable by client applications.

Parameters:
name - Name of the argument.
Returns:
The UPnP state variable associated with the specified argument name.
Throws:
IllegalArgumentException - if the name does not represent a valid argument name for the action.


Copyright © 2011. All Rights Reserved.