Interface UpnpIOService
public interface UpnpIOService
The
UpnpIOService is an interface that described the
UPNP IO Service.- Author:
- Karel Goderis - Initial contribution, Kai Kreuzer - added descriptor url retrieval
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddStatusListener(UpnpIOParticipant participant, String serviceID, String actionID, int interval) Establish a polling mechanism to check the status of a specific UDN device.voidaddSubscription(UpnpIOParticipant participant, String serviceID, int duration) Subscribe to a GENA subscriptiongetDescriptorURL(UpnpIOParticipant participant) Retrieves the descriptor url for the participantinvokeAction(UpnpIOParticipant participant, String serviceID, String actionID, Map<String, String> inputs) Invoke an UPNP ActionbooleanisRegistered(UpnpIOParticipant participant) Verify if the a participant is registeredvoidregisterParticipant(UpnpIOParticipant participant) Register a participant with the UPNP IO ServicevoidremoveStatusListener(UpnpIOParticipant participant) Stops the polling mechanism to check the status of a specific UDN device.voidremoveSubscription(UpnpIOParticipant participant, String serviceID) Unsubscribe from a GENA subscriptionvoidunregisterParticipant(UpnpIOParticipant participant) Unregister a participant with the UPNP IO Service
-
Method Details
-
invokeAction
Map<String,String> invokeAction(UpnpIOParticipant participant, String serviceID, String actionID, Map<String, String> inputs) Invoke an UPNP Action- Parameters:
participant- the participant to invoke the action forserviceID- the UPNP service to invoke the action uponactionID- the Action to invokeinputs- a map of {variable,values} to parameterize the Action that will be invoked
-
addSubscription
Subscribe to a GENA subscription- Parameters:
participant- the participant to the subscription is forserviceID- the UPNP service we want to subscribe toduration- the duration of the subscription
-
removeSubscription
Unsubscribe from a GENA subscription- Parameters:
participant- the participant of the subscriptionserviceID- the UPNP service we want to unsubscribe from
-
isRegistered
Verify if the a participant is registered- Parameters:
participant- the participant whom's participation we want to verify- Returns:
- true of the participant is registered with the UpnpIOService
-
registerParticipant
Register a participant with the UPNP IO Service- Parameters:
participant- the participant whose participation we want to register
-
unregisterParticipant
Unregister a participant with the UPNP IO Service- Parameters:
participant- the participant whose participation we want to unregister
-
getDescriptorURL
Retrieves the descriptor url for the participant- Parameters:
participant- the participant whom's descriptor url is requested- Returns:
- the url of the descriptor as provided by the upnp device
-
addStatusListener
void addStatusListener(UpnpIOParticipant participant, String serviceID, String actionID, int interval) Establish a polling mechanism to check the status of a specific UDN device. The polling mechanism works by invoking the actionID on serviceID every interval. It is assumed that the actionID does not take/have to take any {variable,value} input set- Parameters:
participant- the participant for whom we want to set up a pollingserviceID- the service to use for pollingactionID- the action to callinterval- the interval in seconds
-
removeStatusListener
Stops the polling mechanism to check the status of a specific UDN device.- Parameters:
participant- the participant for whom we want to remove the polling
-