All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ocap.hn.upnp.server.UPnPActionHandler Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
package org.ocap.hn.upnp.server;

import org.ocap.hn.upnp.common.UPnPActionInvocation;
import org.ocap.hn.upnp.common.UPnPResponse;
import org.ocap.hn.upnp.common.UPnPActionResponse;
import org.ocap.hn.upnp.common.UPnPErrorResponse;

/**
 * This class represents an action handler an application can use to receive
 * action requests and respond to them. 
 * A UPnPActionHandler must be provided with the 
 * service description in a call to 
 * UPnPDeviceManager.createService(), or in a call 
 * to UPnPManagedService.setActionHandler() .
 */
public interface UPnPActionHandler
{

    /**
     * Notifies an application registered as an action handler that an action
     * invocation has been received for the {@code UPnPManagedService}
     * it is associated with.  The handler must respond with a properly-formed
     * {@code UPnPResponse}, per the UPnP Device Architecture specification.
     *
     * @param action The UPnP action invocation received. 
     *
     * @return The response to the action: either a 
     *         {@link UPnPActionResponse} or a
     *         {@link UPnPErrorResponse}. A null return
     *         indicates the action was not handled.
     */
    public UPnPResponse notifyActionReceived(UPnPActionInvocation action);

    /**
     * Notifies an application registered as an action handler that 
     * it has been replaced by another 
     * UPnPActionHandler. 
     *  
     * @param replacement The replacement UPnPActionHandler.
     *
     */
    public void notifyActionHandlerReplaced(UPnPActionHandler replacement);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy