Class DpwsFrameworkImpl

java.lang.Object
com.google.common.util.concurrent.AbstractIdleService
org.somda.sdc.dpws.DpwsFrameworkImpl
All Implemented Interfaces:
com.google.common.util.concurrent.Service, DpwsFramework

public class DpwsFrameworkImpl extends com.google.common.util.concurrent.AbstractIdleService implements DpwsFramework
Default implementation of DpwsFramework.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service

    com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    registerService(Collection<com.google.common.util.concurrent.Service> services)
    Registers a service to attach to the framework's lifecycle.
    void
    Sets the network interface to be used by the framework.
    protected void
     
    protected void
     

    Methods inherited from class com.google.common.util.concurrent.AbstractIdleService

    addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, executor, failureCause, isRunning, serviceName, startAsync, state, stopAsync, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.common.util.concurrent.Service

    addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync
  • Method Details

    • startUp

      protected void startUp() throws SocketException, UnknownHostException
      Specified by:
      startUp in class com.google.common.util.concurrent.AbstractIdleService
      Throws:
      SocketException
      UnknownHostException
    • shutDown

      protected void shutDown()
      Specified by:
      shutDown in class com.google.common.util.concurrent.AbstractIdleService
    • setNetworkInterface

      public void setNetworkInterface(NetworkInterface networkInterface)
      Description copied from interface: DpwsFramework
      Sets the network interface to be used by the framework.

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

      Specified by:
      setNetworkInterface in interface DpwsFramework
      Parameters:
      networkInterface - a network interface.
    • registerService

      public void registerService(Collection<com.google.common.util.concurrent.Service> services)
      Description copied from interface: DpwsFramework
      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.
      Specified by:
      registerService in interface DpwsFramework
      Parameters:
      services - Services to register for startup and shutdown.