java - Action with no state variable -


is there way specify @upnpaction no associated @upnpstatevariable in cling?. tried like

public class applicationexecutionserver {     @upnpaction         public void anaction() {         //     } } 

but got error saying action "anaction" not associated state variable.

unfortunately, there no way have 'headless' action. can have inert variable. example, have service uses supposed string setter simulate action doesn't involve primitive state variable.

@upnpstatevariable(defaultvalue="0", sendevents=false) private string clienthandshakedata = null;   /**  * "headless" action ephemeral/transient state variable.  * @param handshakedata  */ @upnpaction public void setclienthandshakedata(@upnpinputargument(name="newclienthandshakedatavalue")string handshakedata){     clienthandshakedata = handshakedata;     processcurrenthandshakedata();     clienthandshakedata = null;  } 

essentially 'clienthandshakedata' ephemeral , expect each call have new value (with new clients connecting). each time new 1 connects, 'process' current handshake data , set null.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -