Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.teleal.cling.protocol
Interface ProtocolFactory

All Known Implementing Classes:
  MockUpnpService.MockProtocolFactory, ProtocolFactoryImpl

    public interface ProtocolFactory

Factory for UPnP protocols, the core implementation of the UPnP specification.

This factory creates an executable protocol either based on the received UPnP messsage, or on local device/search/service metadata). A protocol is an aspect of the UPnP specification, you can override individual protocols to customize the behavior of the UPnP stack.

An implementation has to be thread-safe.

Author:
  Christian Bauer

Method Summary
`ReceivingAsync` | `createReceivingAsync(IncomingDatagramMessage message)` Creates a `ReceivingNotification`, `ReceivingSearch`, or `ReceivingSearchResponse` protocol.
`ReceivingSync` | `createReceivingSync(StreamRequestMessage requestMessage)` Creates a `ReceivingRetrieval`, `ReceivingAction`, `ReceivingSubscribe`, `ReceivingUnsubscribe`, or `ReceivingEvent` protocol.
`SendingAction` | `createSendingAction(ActionInvocation actionInvocation, URL controlURL)` Called by the `ControlPoint`, creates a protocol for executing an action.
`SendingEvent` | `createSendingEvent(LocalGENASubscription subscription)` Called by the `GENASubscription`, creates a protocol for sending GENA events.
`SendingNotificationAlive` | `createSendingNotificationAlive(LocalDevice localDevice)` Called by the `Registry`, creates a protocol for announcing local devices.
`SendingNotificationByebye` | `createSendingNotificationByebye(LocalDevice localDevice)` Called by the `Registry`, creates a protocol for announcing local devices.
`SendingRenewal` | `createSendingRenewal(RemoteGENASubscription subscription)` Called by the `ControlPoint`, creates a protocol for GENA renewal.
`SendingSearch` | `createSendingSearch(UpnpHeader searchTarget, int mxSeconds)` Called by the `ControlPoint`, creates a protocol for a multicast search.
`SendingSubscribe` | `createSendingSubscribe(RemoteGENASubscription subscription)` Called by the `ControlPoint`, creates a protocol for GENA subscription.
`SendingUnsubscribe` | `createSendingUnsubscribe(RemoteGENASubscription subscription)` Called by the `ControlPoint`, creates a protocol for GENA unsubscription.
`UpnpService` | `getUpnpService()`

Method Detail

### getUpnpService

    UpnpService getUpnpService()

### createReceivingAsync

    ReceivingAsync createReceivingAsync(IncomingDatagramMessage message)
                                        throws ProtocolCreationException

  Creates a `ReceivingNotification`, `ReceivingSearch`, or `ReceivingSearchResponse` protocol.

  Parameters:
    `message` - The incoming message, either `UpnpRequest` or `UpnpResponse`.
  Returns:
    The appropriate protocol that handles the messages or `null` if the message should be dropped.
  Throws:
    `ProtocolCreationException` - If no protocol could be found for the message.

### createReceivingSync

    ReceivingSync createReceivingSync(StreamRequestMessage requestMessage)
                                      throws ProtocolCreationException

  Creates a `ReceivingRetrieval`, `ReceivingAction`, `ReceivingSubscribe`, `ReceivingUnsubscribe`, or `ReceivingEvent` protocol.

  Parameters:
    `requestMessage` - The incoming message, examime `UpnpRequest.Method` to determine the protocol.
  Returns:
    The appropriate protocol that handles the messages.
  Throws:
    `ProtocolCreationException` - If no protocol could be found for the message.

### createSendingNotificationAlive

    SendingNotificationAlive createSendingNotificationAlive(LocalDevice localDevice)

  Called by the `Registry`, creates a protocol for announcing local devices.

### createSendingNotificationByebye

    SendingNotificationByebye createSendingNotificationByebye(LocalDevice localDevice)

  Called by the `Registry`, creates a protocol for announcing local devices.

### createSendingSearch

    SendingSearch createSendingSearch(UpnpHeader searchTarget,
                                      int mxSeconds)

  Called by the `ControlPoint`, creates a protocol for a multicast search.

### createSendingAction

    SendingAction createSendingAction(ActionInvocation actionInvocation,
                                      URL controlURL)

  Called by the `ControlPoint`, creates a protocol for executing an action.

### createSendingSubscribe

    SendingSubscribe createSendingSubscribe(RemoteGENASubscription subscription)

  Called by the `ControlPoint`, creates a protocol for GENA subscription.

### createSendingRenewal

    SendingRenewal createSendingRenewal(RemoteGENASubscription subscription)

  Called by the `ControlPoint`, creates a protocol for GENA renewal.

### createSendingUnsubscribe

    SendingUnsubscribe createSendingUnsubscribe(RemoteGENASubscription subscription)

  Called by the `ControlPoint`, creates a protocol for GENA unsubscription.

### createSendingEvent

    SendingEvent createSendingEvent(LocalGENASubscription subscription)

  Called by the `GENASubscription`, creates a protocol for sending GENA events.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011 Teleal GmbH, Switzerland. All Rights Reserved.