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.registry
Class DefaultRegistryListener

    java.lang.Object
      org.teleal.cling.registry.DefaultRegistryListener

All Implemented Interfaces:
  RegistryListener

    public class DefaultRegistryListener

extends Object
implements RegistryListener

Convenience class, provides empty implementations of all methods.

Author:
  Christian Bauer

Constructor Summary
`DefaultRegistryListener()`

Method Summary
`void` | `deviceAdded(Registry registry, Device device)`
`void` | `deviceRemoved(Registry registry, Device device)`
`void` | `localDeviceAdded(Registry registry, LocalDevice device)` Called after you add your own device to the `Registry`.
`void` | `localDeviceRemoved(Registry registry, LocalDevice device)` Called after you remove your own device from the `Registry`.
`void` | `remoteDeviceAdded(Registry registry, RemoteDevice device)` Called when complete metadata of a newly discovered device is available.
`void` | `remoteDeviceDiscoveryFailed(Registry registry, RemoteDevice device, Exception ex)` Called when service metadata couldn't be initialized.
`void` | `remoteDeviceDiscoveryStarted(Registry registry, RemoteDevice device)` Called as soon as possible after a device has been discovered.
`void` | `remoteDeviceRemoved(Registry registry, RemoteDevice device)` Called when a previously discovered device disappears.
`void` | `remoteDeviceUpdated(Registry registry, RemoteDevice device)` Called when a discovered device's expiration timestamp is updated.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultRegistryListener

    public DefaultRegistryListener()

Method Detail

### remoteDeviceDiscoveryStarted

    public void remoteDeviceDiscoveryStarted(Registry registry,
                                             RemoteDevice device)

  Description copied from interface: `RegistryListener`
  Called as soon as possible after a device has been discovered.

  This method will be called after SSDP notification datagrams of a new alive UPnP device have been received and processed. The announced device XML descriptor will be retrieved and parsed. The given `RemoteDevice` metadata is validated and partial `Service` metadata is available. The services are unhydrated, they have no actions or state variable metadata because the service descriptors of the device model have not been retrieved at this point.

  You typically do not use this method on a regular machine, this is an optimization for slower UPnP hosts (such as Android handsets).

  Specified by:
    `remoteDeviceDiscoveryStarted` in interface `RegistryListener`
  Parameters:
    `registry` - The Cling registry of all devices and services know to the local UPnP stack.
    `device` - A validated and hydrated device metadata graph, with anemic service metadata.

### remoteDeviceDiscoveryFailed

    public void remoteDeviceDiscoveryFailed(Registry registry,
                                            RemoteDevice device,
                                            Exception ex)

  Description copied from interface: `RegistryListener`
  Called when service metadata couldn't be initialized.

  If you override the `RegistryListener.remoteDeviceDiscoveryStarted(Registry, org.teleal.cling.model.meta.RemoteDevice)` method, you might want to override this method as well.

  Specified by:
    `remoteDeviceDiscoveryFailed` in interface `RegistryListener`
  Parameters:
    `registry` - The Cling registry of all devices and services know to the local UPnP stack.
    `device` - A validated and hydrated device metadata graph, with anemic service metadata.
    `ex` - The reason why service metadata could not be initialized, or `null` if service descriptors couldn't be retrieved at all.

### remoteDeviceAdded

    public void remoteDeviceAdded(Registry registry,
                                  RemoteDevice device)

  Description copied from interface: `RegistryListener`
  Called when complete metadata of a newly discovered device is available.

  Specified by:
    `remoteDeviceAdded` in interface `RegistryListener`
  Parameters:
    `registry` - The Cling registry of all devices and services know to the local UPnP stack.
    `device` - A validated and hydrated device metadata graph, with complete service metadata.

### remoteDeviceUpdated

    public void remoteDeviceUpdated(Registry registry,
                                    RemoteDevice device)

  Description copied from interface: `RegistryListener`
  Called when a discovered device's expiration timestamp is updated.

  This is a signal that a device is still alive and you typically don't have to react to this event. You will be notified when a device disappears through timeout.

  Specified by:
    `remoteDeviceUpdated` in interface `RegistryListener`
  Parameters:
    `registry` - The Cling registry of all devices and services know to the local UPnP stack.
    `device` - A validated and hydrated device metadata graph, with complete service metadata.

### remoteDeviceRemoved

    public void remoteDeviceRemoved(Registry registry,
                                    RemoteDevice device)

  Description copied from interface: `RegistryListener`
  Called when a previously discovered device disappears.

  This method will also be called when a discovered device did not update its expiration timeout and has been been removed automatically by the local registry.

  Specified by:
    `remoteDeviceRemoved` in interface `RegistryListener`
  Parameters:
    `registry` - The Cling registry of all devices and services know to the local UPnP stack.
    `device` - A validated and hydrated device metadata graph, with complete service metadata.

### localDeviceAdded

    public void localDeviceAdded(Registry registry,
                                 LocalDevice device)

  Description copied from interface: `RegistryListener`
  Called after you add your own device to the `Registry`.

  Specified by:
    `localDeviceAdded` in interface `RegistryListener`
  Parameters:
    `registry` - The Cling registry of all devices and services know to the local UPnP stack.
    `device` - The local device added to the `Registry`.

### localDeviceRemoved

    public void localDeviceRemoved(Registry registry,
                                   LocalDevice device)

  Description copied from interface: `RegistryListener`
  Called after you remove your own device from the `Registry`.

  Specified by:
    `localDeviceRemoved` in interface `RegistryListener`
  Parameters:
    `registry` - The Cling registry of all devices and services know to the local UPnP stack.
    `device` - The local device removed from the `Registry`.

### deviceAdded

    public void deviceAdded(Registry registry,
                            Device device)

### deviceRemoved

    public void deviceRemoved(Registry registry,
                              Device device)

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 © 2010 Teleal GmbH, Switzerland. All Rights Reserved.