Class DpwsFrameworkImpl

  • All Implemented Interfaces:
    com.google.common.util.concurrent.Service , org.somda.sdc.dpws.DpwsFramework

    
    public class DpwsFrameworkImpl
    extends AbstractIdleService implements DpwsFramework
                        

    Default implementation of DpwsFramework.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      synchronized void registerService(Collection<Service> services) Registers a service to attach to the framework's lifecycle.
      void setNetworkInterface(NetworkInterface networkInterface) Sets the network interface to be used by the framework.
      • Methods inherited from class com.google.common.util.concurrent.AbstractIdleService

        addListener, awaitRunning, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • registerService

         synchronized void registerService(Collection<Service> services)

        Registers a service to attach to the framework's lifecycle.

        Starts and shuts down registered services when starting and stopping the framework. Whenever a constructor (outside of the dpws package) receives a wrapped thread pool, it must register the service using this method to ensure it is properly cleaned up when shutting down the device but not the JVM.

        • Services registered when the framework is already running will be started.
        • Services will be shutdown in the inverse order they're registered in, i.e. the last service registered will be the first to shut down.
        Parameters:
        services - Services to register for startup and shutdown.
      • setNetworkInterface

         void setNetworkInterface(NetworkInterface networkInterface)

        Sets the network interface to be used by the framework.

        This may only be set while the framework isn't running.

        Parameters:
        networkInterface - a network interface.