Top Description Methods
org.osgi.service.upnp

public Interface UPnPAction

Imports
java.util.Dictionary

A UPnP action. Each UPnP service contains zero or more actions. Each action may have zero or more UPnP state variables as arguments.
Author
$Id: 848664758445d1510264b23edc70abf71d6439ed $

Method Summary

Modifier and TypeMethod and Description
public String[]

Returns:

Array of input argument names or null if no input arguments.
getInputArgumentNames
()

Lists all input arguments for this action.

public String

Returns:

Name of action, must not contain a hyphen character or a hash character
getName
()

Returns the action name.

public String[]

Returns:

Array of output argument names or null if there are no output arguments.
getOutputArgumentNames
()

List all output arguments for this action.

public String

Returns:

The name of the designated return argument or null if none is marked.
getReturnArgumentName
()

Returns the name of the designated return argument.

public UPnPStateVariable

Returns:

State variable associated with the named argument or null if there is no such argument.
getStateVariable
(String
The name of the UPnP action argument.
argumentName
)

Finds the state variable associated with an argument name.

public Dictionary<String, Object>

Returns:

A Dictionary with the output arguments. null if the action has no output arguments.
invoke
(Dictionary<String, Object>
A Dictionary of arguments. Must contain the correct set and type of arguments for this action. May be null if no input arguments exist.
args
)

Invokes the action.

Method Detail

getInputArgumentNamesback to summary
public String[] getInputArgumentNames()

Lists all input arguments for this action.

Each action may have zero or more input arguments.

This method must continue to return the action input argument names after the UPnP action has been removed from the network.

Returns:String[]

Array of input argument names or null if no input arguments.

See Also
UPnPStateVariable
getNameback to summary
public String getName()

Returns the action name. The action name corresponds to the name field in the actionList of the service description.

  • For standard actions defined by a UPnP Forum working committee, action names must not begin with X_ nor A_.
  • For non-standard actions specified by a UPnP vendor and added to a standard service, action names must begin with X_.

This method must continue to return the action name after the UPnP action has been removed from the network.

Returns:String

Name of action, must not contain a hyphen character or a hash character

getOutputArgumentNamesback to summary
public String[] getOutputArgumentNames()

List all output arguments for this action.

This method must continue to return the action output argument names after the UPnP action has been removed from the network.

Returns:String[]

Array of output argument names or null if there are no output arguments.

See Also
UPnPStateVariable
getReturnArgumentNameback to summary
public String getReturnArgumentName()

Returns the name of the designated return argument.

One of the output arguments can be flagged as a designated return argument.

This method must continue to return the action return argument name after the UPnP action has been removed from the network.

Returns:String

The name of the designated return argument or null if none is marked.

getStateVariableback to summary
public UPnPStateVariable getStateVariable(String argumentName)

Finds the state variable associated with an argument name. Helps to resolve the association of state variables with argument names in UPnP actions.

Parameters
argumentName:String

The name of the UPnP action argument.

Returns:UPnPStateVariable

State variable associated with the named argument or null if there is no such argument.

Exceptions
IllegalStateException:
if the UPnP action has been removed from the network.
See Also
UPnPStateVariable
invokeback to summary
public Dictionary<String, Object> invoke(Dictionary<String, Object> args) throws Exception

Invokes the action. The input and output arguments are both passed as Dictionary objects. Each entry in the Dictionary object has a String object as key representing the argument name and the value is the argument itself. The class of an argument value must be assignable from the class of the associated UPnP state variable. The input argument Dictionary object must contain exactly those arguments listed by getInputArguments method. The output argument Dictionary object will contain exactly those arguments listed by getOutputArguments method.

Parameters
args:Dictionary<String, Object>

A Dictionary of arguments. Must contain the correct set and type of arguments for this action. May be null if no input arguments exist.

Returns:Dictionary<String, Object>

A Dictionary with the output arguments. null if the action has no output arguments.

Exceptions
Exception:
The execution fails for some reason.
UPnPException:
A UPnP error has occurred.
IllegalStateException:
if the UPnP action has been removed from the network.
See Also
UPnPStateVariable