cybergarage-upnp
org.cybergarage.upnp.Service Class Reference

Public Member Functions

Node getServiceNode ()
 
 Service ()
 
 Service (Node node)
 
void lock ()
 
void unlock ()
 
Device getDevice ()
 
Device getRootDevice ()
 
void setServiceType (String value)
 
String getServiceType ()
 
void setServiceID (String value)
 
String getServiceID ()
 
void updateConfigId ()
 
int getConfigId ()
 
void setSCPDURL (String value)
 
String getSCPDURL ()
 
boolean isSCPDURL (String url)
 
void setControlURL (String value)
 
String getControlURL ()
 
boolean isControlURL (String url)
 
void setEventSubURL (String value)
 
String getEventSubURL ()
 
boolean isEventSubURL (String url)
 
boolean loadSCPD (String scpdStr) throws InvalidDescriptionException
 
boolean loadSCPD (File file) throws ParserException
 
boolean loadSCPD (InputStream input) throws ParserException
 
void setDescriptionURL (String value)
 
String getDescriptionURL ()
 
byte[] getSCPDData ()
 
ActionList getActionList ()
 
Action getAction (String actionName)
 
void addAction (Action a)
 
ServiceStateTable getServiceStateTable ()
 
StateVariable getStateVariable (String name)
 
boolean hasStateVariable (String name)
 
boolean isService (String name)
 
void announce (String bindAddr)
 
void byebye (String bindAddr)
 
boolean serviceSearchResponse (SSDPPacket ssdpPacket)
 
void setQueryListener (QueryListener queryListener)
 
SubscriberList getSubscriberList ()
 
void addSubscriber (Subscriber sub)
 
void removeSubscriber (Subscriber sub)
 
Subscriber getSubscriber (String name)
 
void notify (StateVariable stateVar)
 
void notifyAllStateVariables ()
 
String getSID ()
 
void setSID (String id)
 
void clearSID ()
 
boolean hasSID ()
 
boolean isSubscribed ()
 
long getTimeout ()
 
void setTimeout (long value)
 
void setActionListener (ActionListener listener)
 
void addStateVariable (StateVariable var)
 
void setUserData (Object data)
 
Object getUserData ()
 

Static Public Member Functions

static boolean isServiceNode (Node node)
 

Static Public Attributes

static final String ELEM_NAME = "service"
 
static final String SCPD_ROOTNODE ="scpd"
 
static final String SCPD_ROOTNODE_NS ="urn:schemas-upnp-org:service-1-0"
 
static final String SPEC_VERSION ="specVersion"
 
static final String MAJOR ="major"
 
static final String MAJOR_VALUE ="1"
 
static final String MINOR ="minor"
 
static final String MINOR_VALUE ="0"
 

Private Member Functions

Node getDeviceNode ()
 
Node getRootNode ()
 
boolean isURL (String referenceUrl, String url)
 
Node getSCPDNode (URL scpdUrl) throws ParserException
 
Node getSCPDNode (File scpdFile) throws ParserException
 
Node getSCPDNode ()
 
ServiceData getServiceData ()
 
String getNotifyServiceTypeNT ()
 
String getNotifyServiceTypeUSN ()
 
boolean notify (Subscriber sub, StateVariable stateVar)
 

Private Attributes

Node serviceNode
 
Mutex mutex = new Mutex()
 
Object userData = null
 

Static Private Attributes

static final String SERVICE_TYPE = "serviceType"
 
static final String SERVICE_ID = "serviceId"
 
static final String CONFIG_ID = "configId"
 
static final String SCPDURL = "SCPDURL"
 
static final String CONTROL_URL = "controlURL"
 
static final String EVENT_SUB_URL = "eventSubURL"
 

Constructor & Destructor Documentation

◆ Service() [1/2]

org.cybergarage.upnp.Service.Service ( )
inline

◆ Service() [2/2]

org.cybergarage.upnp.Service.Service ( Node node)
inline

Member Function Documentation

◆ addAction()

void org.cybergarage.upnp.Service.addAction ( Action a)
inline

◆ addStateVariable()

void org.cybergarage.upnp.Service.addStateVariable ( StateVariable var)
inline

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
varStateVariable that will be added
Author
Stefano "Kismet" Lenzi - kisme.nosp@m.t-sl.nosp@m.@user.nosp@m.s.so.nosp@m.urcef.nosp@m.orge.nosp@m..net - 2005

◆ addSubscriber()

void org.cybergarage.upnp.Service.addSubscriber ( Subscriber sub)
inline

◆ announce()

void org.cybergarage.upnp.Service.announce ( String bindAddr)
inline

◆ byebye()

void org.cybergarage.upnp.Service.byebye ( String bindAddr)
inline

◆ clearSID()

void org.cybergarage.upnp.Service.clearSID ( )
inline

◆ getAction()

Action org.cybergarage.upnp.Service.getAction ( String actionName)
inline

◆ getActionList()

ActionList org.cybergarage.upnp.Service.getActionList ( )
inline

◆ getConfigId()

int org.cybergarage.upnp.Service.getConfigId ( )
inline

◆ getControlURL()

String org.cybergarage.upnp.Service.getControlURL ( )
inline

◆ getDescriptionURL()

String org.cybergarage.upnp.Service.getDescriptionURL ( )
inline

◆ getDevice()

Device org.cybergarage.upnp.Service.getDevice ( )
inline

◆ getDeviceNode()

Node org.cybergarage.upnp.Service.getDeviceNode ( )
inlineprivate

◆ getEventSubURL()

String org.cybergarage.upnp.Service.getEventSubURL ( )
inline

◆ getNotifyServiceTypeNT()

String org.cybergarage.upnp.Service.getNotifyServiceTypeNT ( )
inlineprivate

◆ getNotifyServiceTypeUSN()

String org.cybergarage.upnp.Service.getNotifyServiceTypeUSN ( )
inlineprivate

◆ getRootDevice()

Device org.cybergarage.upnp.Service.getRootDevice ( )
inline

◆ getRootNode()

Node org.cybergarage.upnp.Service.getRootNode ( )
inlineprivate

◆ getSCPDData()

byte[] org.cybergarage.upnp.Service.getSCPDData ( )
inline

◆ getSCPDNode() [1/3]

Node org.cybergarage.upnp.Service.getSCPDNode ( )
inlineprivate

◆ getSCPDNode() [2/3]

Node org.cybergarage.upnp.Service.getSCPDNode ( File scpdFile) throws ParserException
inlineprivate

◆ getSCPDNode() [3/3]

Node org.cybergarage.upnp.Service.getSCPDNode ( URL scpdUrl) throws ParserException
inlineprivate

◆ getSCPDURL()

String org.cybergarage.upnp.Service.getSCPDURL ( )
inline

◆ getServiceData()

ServiceData org.cybergarage.upnp.Service.getServiceData ( )
inlineprivate

◆ getServiceID()

String org.cybergarage.upnp.Service.getServiceID ( )
inline

◆ getServiceNode()

Node org.cybergarage.upnp.Service.getServiceNode ( )
inline

◆ getServiceStateTable()

ServiceStateTable org.cybergarage.upnp.Service.getServiceStateTable ( )
inline

◆ getServiceType()

String org.cybergarage.upnp.Service.getServiceType ( )
inline

◆ getSID()

String org.cybergarage.upnp.Service.getSID ( )
inline

◆ getStateVariable()

StateVariable org.cybergarage.upnp.Service.getStateVariable ( String name)
inline

◆ getSubscriber()

Subscriber org.cybergarage.upnp.Service.getSubscriber ( String name)
inline

◆ getSubscriberList()

SubscriberList org.cybergarage.upnp.Service.getSubscriberList ( )
inline

◆ getTimeout()

long org.cybergarage.upnp.Service.getTimeout ( )
inline

◆ getUserData()

Object org.cybergarage.upnp.Service.getUserData ( )
inline

◆ hasSID()

boolean org.cybergarage.upnp.Service.hasSID ( )
inline

◆ hasStateVariable()

boolean org.cybergarage.upnp.Service.hasStateVariable ( String name)
inline

◆ isControlURL()

boolean org.cybergarage.upnp.Service.isControlURL ( String url)
inline

◆ isEventSubURL()

boolean org.cybergarage.upnp.Service.isEventSubURL ( String url)
inline

◆ isSCPDURL()

boolean org.cybergarage.upnp.Service.isSCPDURL ( String url)
inline

◆ isService()

boolean org.cybergarage.upnp.Service.isService ( String name)
inline

◆ isServiceNode()

static boolean org.cybergarage.upnp.Service.isServiceNode ( Node node)
inlinestatic

◆ isSubscribed()

boolean org.cybergarage.upnp.Service.isSubscribed ( )
inline

◆ isURL()

boolean org.cybergarage.upnp.Service.isURL ( String referenceUrl,
String url )
inlineprivate

◆ loadSCPD() [1/3]

boolean org.cybergarage.upnp.Service.loadSCPD ( File file) throws ParserException
inline

◆ loadSCPD() [2/3]

boolean org.cybergarage.upnp.Service.loadSCPD ( InputStream input) throws ParserException
inline
Since
1.8.0

◆ loadSCPD() [3/3]

boolean org.cybergarage.upnp.Service.loadSCPD ( String scpdStr) throws InvalidDescriptionException
inline

◆ lock()

void org.cybergarage.upnp.Service.lock ( )
inline

◆ notify() [1/2]

void org.cybergarage.upnp.Service.notify ( StateVariable stateVar)
inline

◆ notify() [2/2]

boolean org.cybergarage.upnp.Service.notify ( Subscriber sub,
StateVariable stateVar )
inlineprivate

◆ notifyAllStateVariables()

void org.cybergarage.upnp.Service.notifyAllStateVariables ( )
inline

◆ removeSubscriber()

void org.cybergarage.upnp.Service.removeSubscriber ( Subscriber sub)
inline

◆ serviceSearchResponse()

boolean org.cybergarage.upnp.Service.serviceSearchResponse ( SSDPPacket ssdpPacket)
inline

◆ setActionListener()

void org.cybergarage.upnp.Service.setActionListener ( ActionListener listener)
inline

◆ setControlURL()

void org.cybergarage.upnp.Service.setControlURL ( String value)
inline

◆ setDescriptionURL()

void org.cybergarage.upnp.Service.setDescriptionURL ( String value)
inline

◆ setEventSubURL()

void org.cybergarage.upnp.Service.setEventSubURL ( String value)
inline

◆ setQueryListener()

void org.cybergarage.upnp.Service.setQueryListener ( QueryListener queryListener)
inline

◆ setSCPDURL()

void org.cybergarage.upnp.Service.setSCPDURL ( String value)
inline

◆ setServiceID()

void org.cybergarage.upnp.Service.setServiceID ( String value)
inline

◆ setServiceType()

void org.cybergarage.upnp.Service.setServiceType ( String value)
inline

◆ setSID()

void org.cybergarage.upnp.Service.setSID ( String id)
inline

◆ setTimeout()

void org.cybergarage.upnp.Service.setTimeout ( long value)
inline

◆ setUserData()

void org.cybergarage.upnp.Service.setUserData ( Object data)
inline

◆ unlock()

void org.cybergarage.upnp.Service.unlock ( )
inline

◆ updateConfigId()

void org.cybergarage.upnp.Service.updateConfigId ( )
inline

Field Documentation

◆ CONFIG_ID

final String org.cybergarage.upnp.Service.CONFIG_ID = "configId"
staticprivate

◆ CONTROL_URL

final String org.cybergarage.upnp.Service.CONTROL_URL = "controlURL"
staticprivate

◆ ELEM_NAME

final String org.cybergarage.upnp.Service.ELEM_NAME = "service"
static

◆ EVENT_SUB_URL

final String org.cybergarage.upnp.Service.EVENT_SUB_URL = "eventSubURL"
staticprivate

◆ MAJOR

final String org.cybergarage.upnp.Service.MAJOR ="major"
static

◆ MAJOR_VALUE

final String org.cybergarage.upnp.Service.MAJOR_VALUE ="1"
static

◆ MINOR

final String org.cybergarage.upnp.Service.MINOR ="minor"
static

◆ MINOR_VALUE

final String org.cybergarage.upnp.Service.MINOR_VALUE ="0"
static

◆ mutex

Mutex org.cybergarage.upnp.Service.mutex = new Mutex()
private

◆ SCPD_ROOTNODE

final String org.cybergarage.upnp.Service.SCPD_ROOTNODE ="scpd"
static

◆ SCPD_ROOTNODE_NS

final String org.cybergarage.upnp.Service.SCPD_ROOTNODE_NS ="urn:schemas-upnp-org:service-1-0"
static

◆ SCPDURL

final String org.cybergarage.upnp.Service.SCPDURL = "SCPDURL"
staticprivate

◆ SERVICE_ID

final String org.cybergarage.upnp.Service.SERVICE_ID = "serviceId"
staticprivate

◆ SERVICE_TYPE

final String org.cybergarage.upnp.Service.SERVICE_TYPE = "serviceType"
staticprivate

◆ serviceNode

Node org.cybergarage.upnp.Service.serviceNode
private

◆ SPEC_VERSION

final String org.cybergarage.upnp.Service.SPEC_VERSION ="specVersion"
static

◆ userData

Object org.cybergarage.upnp.Service.userData = null
private

The documentation for this class was generated from the following file: