Class Service

java.lang.Object
org.cybergarage.upnp.Service

public class Service extends Object
  • Field Details

  • Constructor Details

    • Service

      public Service()
    • Service

      public Service(Node node)
  • Method Details

    • getServiceNode

      public Node getServiceNode()
    • lock

      public void lock()
    • unlock

      public void unlock()
    • isServiceNode

      public static boolean isServiceNode(Node node)
    • getDevice

      public Device getDevice()
    • getRootDevice

      public Device getRootDevice()
    • setServiceType

      public void setServiceType(String value)
    • getServiceType

      public String getServiceType()
    • setServiceID

      public void setServiceID(String value)
    • getServiceID

      public String getServiceID()
    • updateConfigId

      public void updateConfigId()
    • getConfigId

      public int getConfigId()
    • setSCPDURL

      public void setSCPDURL(String value)
    • getSCPDURL

      public String getSCPDURL()
    • isSCPDURL

      public boolean isSCPDURL(String url)
    • setControlURL

      public void setControlURL(String value)
    • getControlURL

      public String getControlURL()
    • isControlURL

      public boolean isControlURL(String url)
    • setEventSubURL

      public void setEventSubURL(String value)
    • getEventSubURL

      public String getEventSubURL()
    • isEventSubURL

      public boolean isEventSubURL(String url)
    • loadSCPD

      public boolean loadSCPD(String scpdStr) throws InvalidDescriptionException
      Throws:
      InvalidDescriptionException
    • loadSCPD

      public boolean loadSCPD(File file) throws ParserException
      Throws:
      ParserException
    • loadSCPD

      public boolean loadSCPD(InputStream input) throws ParserException
      Throws:
      ParserException
      Since:
      1.8.0
    • setDescriptionURL

      public void setDescriptionURL(String value)
    • getDescriptionURL

      public String getDescriptionURL()
    • getSCPDData

      public byte[] getSCPDData()
    • getActionList

      public ActionList getActionList()
    • getAction

      public Action getAction(String actionName)
    • addAction

      public void addAction(Action a)
    • getServiceStateTable

      public ServiceStateTable getServiceStateTable()
    • getStateVariable

      public StateVariable getStateVariable(String name)
    • hasStateVariable

      public boolean hasStateVariable(String name)
    • isService

      public boolean isService(String name)
    • announce

      public void announce(String bindAddr)
    • byebye

      public void byebye(String bindAddr)
    • serviceSearchResponse

      public boolean serviceSearchResponse(SSDPPacket ssdpPacket)
    • setQueryListener

      public void setQueryListener(QueryListener queryListener)
    • getSubscriberList

      public SubscriberList getSubscriberList()
    • addSubscriber

      public void addSubscriber(Subscriber sub)
    • removeSubscriber

      public void removeSubscriber(Subscriber sub)
    • getSubscriber

      public Subscriber getSubscriber(String name)
    • notify

      public void notify(StateVariable stateVar)
    • notifyAllStateVariables

      public void notifyAllStateVariables()
    • getSID

      public String getSID()
    • setSID

      public void setSID(String id)
    • clearSID

      public void clearSID()
    • hasSID

      public boolean hasSID()
    • isSubscribed

      public boolean isSubscribed()
    • getTimeout

      public long getTimeout()
    • setTimeout

      public void setTimeout(long value)
    • setActionListener

      public void setActionListener(ActionListener listener)
    • addStateVariable

      public void addStateVariable(StateVariable var)
      Add the StateVariable to the service.

      Note: This method should be used to create a dynamic
      Device withtout writing any XML that describe the device
      .
      Note: that no control for duplicate StateVariable is done.
      Parameters:
      var - StateVariable that will be added
    • setUserData

      public void setUserData(Object data)
    • getUserData

      public Object getUserData()