81cdbd67e7fb5f3101657029b05d0761cd182c57
[packetcable.git] / packetcable-driver / src / main / java / org / pcmm / rcd / IPCMMClient.java
1 /*
2  * (c) 2015 Cable Television Laboratories, Inc.  All rights reserved.
3  */
4
5 package org.pcmm.rcd;
6
7 import org.umu.cops.stack.COPSHandle;
8 import org.umu.cops.stack.COPSMsg;
9
10 import java.io.IOException;
11
12 /**
13  * <p>
14  * This is a Client Type 1, which represents existing "legacy" endpoints (e.g.,
15  * PC applications, gaming consoles) that lack specific QoS awareness or
16  * signaling capabilities. This client has no awareness of DOCSIS, CableHome, or
17  * PacketCable messaging, and hence no related requirements can be placed upon
18  * it. Client Type 1 communicates with an Application Manager to request
19  * service, and does not (cannot) request QoS resources directly from the MSO
20  * access network.
21  * </p>
22  * 
23  * 
24  */
25 public interface IPCMMClient {
26
27         /**
28          * PCMM client-type
29          */
30         short CLIENT_TYPE = (short) 0x800A;
31
32         /**
33          * sends a message to the server.
34          * 
35          * @param requestMessage
36          *            request message.
37          */
38         void sendRequest(COPSMsg requestMessage);
39
40         /**
41          * Reads message from server
42          * 
43          * @return COPS message
44          */
45         COPSMsg readMessage();
46
47         /**
48          * tries to connect to the server.
49          * @throws IOException
50          */
51         void connect() throws IOException;
52
53         /**
54          * disconnects from server.
55          * 
56          * @return disconnection status.
57          */
58         boolean disconnect();
59
60         /**
61          * 
62          * @return whether the client is connected to the server of not.
63          */
64         boolean isConnected();
65
66         /**
67          * gets the client handle
68          * 
69          * @return client handle
70          */
71         COPSHandle getClientHandle();
72
73         void setClientHandle(COPSHandle handle);
74
75 }