View Javadoc
1   /*
2    * Copyright (C) 2013 4th Line GmbH, Switzerland
3    *
4    * The contents of this file are subject to the terms of either the GNU
5    * Lesser General Public License Version 2 or later ("LGPL") or the
6    * Common Development and Distribution License Version 1 or later
7    * ("CDDL") (collectively, the "License"). You may not use this file
8    * except in compliance with the License. See LICENSE.txt for more
9    * information.
10   *
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14   */
15  
16  package org.fourthline.cling;
17  
18  import org.fourthline.cling.controlpoint.ControlPoint;
19  import org.fourthline.cling.protocol.ProtocolFactory;
20  import org.fourthline.cling.registry.Registry;
21  import org.fourthline.cling.transport.Router;
22  
23  /**
24   * Primary interface of the Cling Core UPnP stack.
25   * <p>
26   * An implementation can either start immediately when constructed or offer an additional
27   * method that starts the UPnP stack on-demand. Implementations are not required to be
28   * restartable after shutdown.
29   * </p>
30   * <p>
31   * Implementations are always thread-safe and can be shared and called concurrently.
32   * </p>
33   *
34   * @author Christian Bauer
35   */
36  public interface UpnpService {
37  
38      public UpnpServiceConfiguration getConfiguration();
39  
40      public ControlPoint getControlPoint();
41  
42      public ProtocolFactory getProtocolFactory();
43  
44      public Registry getRegistry();
45  
46      public Router getRouter();
47  
48      /**
49       * Stopping the UPnP stack.
50       * <p>
51       * Clients are required to stop the UPnP stack properly. Notifications for
52       * disappearing devices will be multicast'ed, existing event subscriptions cancelled.
53       * </p>
54       */
55      public void shutdown();
56  
57      static public class Start {
58  
59      }
60  
61      static public class Shutdown {
62  
63      }
64  
65  }