Class DeviceImpl

  • All Implemented Interfaces:
    com.google.common.util.concurrent.Service , org.somda.sdc.dpws.device.Device , org.somda.sdc.dpws.device.DiscoveryAccess , org.somda.sdc.dpws.device.HostingServiceAccess

    
    public class DeviceImpl
    extends AbstractIdleService implements Device, Service, DiscoveryAccess, HostingServiceAccess
                        

    Default implementation of Device, DiscoveryAccess and HostingServiceAccess.

    todo DGr no support for hosting and hosted services being updated during runtime.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final String eprAddress
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • setTypes

         void setTypes(Collection<QName> types)

        Sets the types in accordance with WS-Discovery.

        Parameters:
        types - the types to set.
      • setScopes

         void setScopes(Collection<String> scopes)

        Sets the scopes in accordance with WS-Discovery.

        Parameters:
        scopes - the scopes to set.
      • sendHello

         void sendHello()

        Sends a Hello message to the network.

        The Hello message will be sent only if setScopes or setTypes has been called prior to this function. This needs to be repeated for every Hello to be sent.

      • setThisDevice

         void setThisDevice(ThisDeviceType thisDevice)

        Adds the ThisModel definition.

        According to the DPWS specification, certain information is limited in the number of characters:

        Attention: If those limits are exceeded, the underlying implementation may cut off overflowing characters.

        Parameters:
        thisDevice - the ThisModel information to set.
      • setThisModel

         void setThisModel(ThisModelType thisModel)

        Updates the ThisModel definition.

        According to the DPWS specification, certain information is limited in the number of characters:

        Attention: If those limits are exceeded, the underlying implementation may cut off overflowing characters.

        Parameters:
        thisModel - the ThisModel information to set.
      • addHostedService

         void addHostedService(HostedService hostedService)

        Adds a hosted service definition.

        Attention: there is currently no mechanism that verifies if the hosted service was added before!

        Parameters:
        hostedService - the hosted service definition to add.