Package com.metratec.lib.upnp
Class Service
- java.lang.Object
-
- com.metratec.lib.upnp.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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Action
getActionByName(java.lang.String name)
java.util.List<Action>
getActions()
Fetches the list of actions of this service.java.util.List<Action>
getActions(boolean block)
Fetches the list of actions of this service.java.net.URL
getBaseURL()
java.lang.String
getControlURL()
java.lang.String
getEventSubURL()
java.lang.String
getServiceId()
java.lang.String
getServiceType()
-
-
-
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)
-
-