|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.tomp2p.upnp.ActionMessage
public class ActionMessage
Message object for an UPNP action, simply call setInputParameter() to add the required action message params and then service() to receive the ActionResponse built with the parsed UPNP device SOAP xml response.
Constructor Summary | |
---|---|
protected |
ActionMessage(Service service,
Action serviceAction)
Protected constuctor so that only messages factories can build it |
Method Summary | |
---|---|
void |
clearInputParameters()
Method to clear all set input parameters so that this object can be reused |
ActionResponse |
service()
Executes the message and retuns the UPNP device response, according to the UPNP specs, this method could take up to 30 secs to process ( time allowed for a device to respond to a request ) |
ActionMessage |
setInputParameter(String parameterName,
boolean parameterValue)
Set the value of an input parameter before a message service call |
ActionMessage |
setInputParameter(String parameterName,
byte parameterValue)
Set the value of an input parameter before a message service call |
ActionMessage |
setInputParameter(String parameterName,
Date parameterValue)
Set the value of an input parameter before a message service call |
ActionMessage |
setInputParameter(String parameterName,
double parameterValue)
Set the value of an input parameter before a message service call |
ActionMessage |
setInputParameter(String parameterName,
float parameterValue)
Set the value of an input parameter before a message service call |
ActionMessage |
setInputParameter(String parameterName,
int parameterValue)
Set the value of an input parameter before a message service call |
ActionMessage |
setInputParameter(String parameterName,
long parameterValue)
Set the value of an input parameter before a message service call |
ActionMessage |
setInputParameter(String parameterName,
Object parameterValue)
Set the value of an input parameter before a message service call. |
ActionMessage |
setInputParameter(String parameterName,
short parameterValue)
Set the value of an input parameter before a message service call |
ActionMessage |
setInputParameter(String parameterName,
String parameterValue)
Set the value of an input parameter before a message service call. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ActionMessage(Service service, Action serviceAction)
service
- the service for which theserviceAction
- Method Detail |
---|
public void clearInputParameters()
public ActionResponse service() throws IOException, UPNPResponseException
IOException
- if some IOException occurs during message send and reception process
UPNPResponseException
- if an UPNP error message is returned from the server or if some parsing exception
occurs ( detailErrorCode = 899, detailErrorDescription = SAXException message )public ActionMessage setInputParameter(String parameterName, Object parameterValue) throws IllegalArgumentException
parameterName
- the parameter nameparameterValue
- the parameter value as an object, primitive object are handled, all other object will be
assigned with a call to their toString() method call
IllegalArgumentException
- if the provided parameterName is not valid for this message or if no input
parameters are required for this messagepublic ActionMessage setInputParameter(String parameterName, String parameterValue) throws IllegalArgumentException
parameterName
- the parameter nameparameterValue
- the string parameter value
IllegalArgumentException
- if the provided parameterName is not valid for this message or if no input
parameters are required for this messagepublic ActionMessage setInputParameter(String parameterName, Date parameterValue) throws IllegalArgumentException
parameterName
- the parameter nameparameterValue
- the date parameter value, will be automatically translated to the correct ISO 8601 date
format for the given action input param related state variable
IllegalArgumentException
- if the provided parameterName is not valid for this message or if no input
parameters are required for this messagepublic ActionMessage setInputParameter(String parameterName, boolean parameterValue) throws IllegalArgumentException
parameterName
- the parameter nameparameterValue
- the boolean parameter value
IllegalArgumentException
- if the provided parameterName is not valid for this message or if no input
parameters are required for this messagepublic ActionMessage setInputParameter(String parameterName, byte parameterValue) throws IllegalArgumentException
parameterName
- the parameter nameparameterValue
- the byte parameter value
IllegalArgumentException
- if the provided parameterName is not valid for this message or if no input
parameters are required for this messagepublic ActionMessage setInputParameter(String parameterName, short parameterValue) throws IllegalArgumentException
parameterName
- the parameter nameparameterValue
- the short parameter value
IllegalArgumentException
- if the provided parameterName is not valid for this message or if no input
parameters are required for this messagepublic ActionMessage setInputParameter(String parameterName, int parameterValue) throws IllegalArgumentException
parameterName
- the parameter nameparameterValue
- the integer parameter value
IllegalArgumentException
- if the provided parameterName is not valid for this message or if no input
parameters are required for this messagepublic ActionMessage setInputParameter(String parameterName, long parameterValue) throws IllegalArgumentException
parameterName
- the parameter nameparameterValue
- the long parameter value
IllegalArgumentException
- if the provided parameterName is not valid for this message or if no input
parameters are required for this messagepublic ActionMessage setInputParameter(String parameterName, float parameterValue) throws IllegalArgumentException
parameterName
- the parameter nameparameterValue
- the float parameter value
IllegalArgumentException
- if the provided parameterName is not valid for this message or if no input
parameters are required for this messagepublic ActionMessage setInputParameter(String parameterName, double parameterValue) throws IllegalArgumentException
parameterName
- the parameter nameparameterValue
- the double parameter value
IllegalArgumentException
- if the provided parameterName is not valid for this message or if no input
parameters are required for this message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |