e27e1ef93e1762c2450a7853505ef39b1c1e84a9
[packetcable.git] / packetcable-driver / src / main / java / org / pcmm / rcd / IPCMMServer.java
1 /*
2  * (c) 2015 Cable Television Laboratories, Inc.  All rights reserved.
3  */
4
5 package org.pcmm.rcd;
6
7 import org.pcmm.concurrent.IWorker;
8 import org.pcmm.state.IStateful;
9
10 import java.io.IOException;
11
12 /**
13  * <p>
14  * As discussed in RFC 2753 [11], the policy management framework underlying
15  * PacketCable Multimedia is based on the work of the IETF's Resource Allocation
16  * Protocol (RAP) working group. Since the Policy Server is situated between the
17  * Application Manager and the CMTS, it simultaneously plays a dual role as a
18  * "proxy" for AM-initiated session requests and as a "sentry" for defining and
19  * enforcing Resource Control Domain policy.
20  * </p>
21  * <p>
22  * As described in [11] and in keeping with the PacketCable 1.x DQoS model, the
23  * Policy Server serves as Policy Decision Point (PDP) in relation to the CMTS
24  * resource-management procedures. Conversely, the Policy Server assumes the
25  * role of Policy Enforcement Point (PEP) in relation to the Application Manager
26  * as it proxies Gate Control messages to and from the CMTS element.
27  * </p>
28  * <p>
29  * To revisit the interaction scenario, the Application Manager issues policy
30  * requests to the Policy Server. The Policy Server acting as a "sentry" for
31  * these requests, and applies a set of policy rules that have been
32  * pre-provisioned by the MSO. Upon passing the checks, the Policy Server then
33  * acts as a "proxy" with respect to the Application Manager and the CMTS,
34  * forwarding the policy request and returning any associated response. Each
35  * policy request transaction must be processed individually.
36  * </p>
37  * <p>
38  * Policy decisions may be based on a number of factors, such as:
39  * <ul>
40  * <li>Parameters associated with the request and the status of available
41  * resources</li>
42  * <li>Identity of the particular client and associated profile information</li>
43  * <li>Application parameters</li>
44  * <li>Security considerations</li>
45  * <li>Time-of-day</li>
46  * </ul>
47  * The primary functions of the Policy Server include:
48  * <ul>
49  * <li>A policy decision request mechanism, invoked by Application Managers</li>
50  * <li>A policy decision request 'policing' mechanism, enforcing installed
51  * Policy Rules</li>
52  * <li>A policy decision delivery mechanism, used to install policy decisions on
53  * the CMTS</li>
54  * <li>A mechanism to allow for the proxying of QoS management messages to the
55  * CMTS on behalf of the Application Manager</li>
56  * <li>An event recording interface to a Record Keeping Server that is used to
57  * log policy requests, which may in turn be correlated with network resource
58  * usage records</li>
59  * </ul>
60  * <p>
61  * Since the Policy Server functions as a proxy between the AM and CMTS elements
62  * (with complementary client and server interfaces) some MSOs may elect to
63  * deploy multiple layers of Policy Servers and to delegate certain policy
64  * decisions among these servers in order to satisfy requirements associated
65  * with scalability and fault-tolerance.
66  * </p>
67  * </p>
68  */
69 public interface IPCMMServer extends IStateful {
70
71     /**
72      * Starts all connections and threads
73      */
74     void startServer() throws IOException;
75
76     /**
77      * Stops all connections and threads
78      */
79     void stopServer();
80
81     /**
82      * When a client connects to the server, a handler is needed to manage the
83      * exchange of the messages between this client and the server.
84      */
85     interface IPCMMClientHandler extends IWorker, IPCMMClient {
86         /**
87          * Responsible for closing resources such as server connections or threads
88          */
89         void stop();
90     }
91 }