Class Service


  • public class Service
    extends java.lang.Object
    Class to represent an UPnP service.
    • Constructor Summary

      Constructors 
      Constructor Description
      Service​(java.net.URL baseURL, java.lang.String serviceType, java.lang.String serviceId, java.lang.String scpdUrl, java.lang.String controlURL, java.lang.String eventSubURL)  
    • Constructor Detail

      • Service

        public Service​(java.net.URL baseURL,
                       java.lang.String serviceType,
                       java.lang.String serviceId,
                       java.lang.String scpdUrl,
                       java.lang.String controlURL,
                       java.lang.String eventSubURL)
    • Method Detail

      • getBaseURL

        public java.net.URL getBaseURL()
      • getServiceType

        public java.lang.String getServiceType()
      • getServiceId

        public java.lang.String getServiceId()
      • getControlURL

        public java.lang.String getControlURL()
      • getEventSubURL

        public java.lang.String getEventSubURL()
      • getActions

        public java.util.List<Action> getActions()
        Fetches the list of actions of this service.

        The method may block, if the service actions hasn't already been fetched.

        Returns:
        the list of actions of this service
      • getActions

        public java.util.List<Action> getActions​(boolean block)
        Fetches the list of actions of this service.

        The actions is loaded asynchronously in a new thread. If the value of block is set to 'false', then the method will simply return 'null' without waiting for the thread to complete its execution. If block is set to 'true', the method waits for the thread to complete then returns the result.

        Parameters:
        block - should the method block until the thread completes its execution
        Returns:
        list of actions of this service
      • getActionByName

        public Action getActionByName​(java.lang.String name)