Merge "Remove "response" from yang."
[packetcable.git] / protocol_plugins.packetcable / src / main / java / org / pcmm / rcd / IPCMMClient.java
1 /**
2  @header@
3  */
4
5 package org.pcmm.rcd;
6
7 import java.net.InetAddress;
8
9 import org.umu.cops.stack.COPSMsg;
10
11 /**
12  * <p>
13  * This is a Client Type 1, which represents existing "legacy" endpoints (e.g.,
14  * PC applications, gaming consoles) that lack specific QoS awareness or
15  * signaling capabilities. This client has no awareness of DOCSIS, CableHome, or
16  * PacketCable messaging, and hence no related requirements can be placed upon
17  * it. Client Type 1 communicates with an Application Manager to request
18  * service, and does not (cannot) request QoS resources directly from the MSO
19  * access network.
20  * </p>
21  * 
22  * 
23  */
24 public interface IPCMMClient {
25
26         /**
27          * PCMM client-type
28          */
29         static final short CLIENT_TYPE = (short) 0x800A;
30
31         /**
32          * sends a message to the server.
33          * 
34          * @param requestMessage
35          *            request message.
36          */
37         void sendRequest(COPSMsg requestMessage);
38
39         /**
40          * Reads message from server
41          * 
42          * @return COPS message
43          */
44         COPSMsg readMessage();
45
46         /**
47          * tries to connect to the server.
48          * 
49          * @param address
50          *            server address
51          * @param port
52          *            server port
53          * @return connection state
54          */
55         boolean tryConnect(String address, int port);
56
57         /**
58          * tries to connect to the server.
59          * 
60          * @param address
61          *            server address
62          * @param port
63          *            server port
64          * @return connection state
65          */
66         boolean tryConnect(InetAddress address, int port);
67
68         /**
69          * disconnects from server.
70          * 
71          * @return disconnection status.
72          */
73         boolean disconnect();
74
75         /**
76          * 
77          * @return whether the client is connected to the server of not.
78          */
79         boolean isConnected();
80
81         /**
82          * gets the client handle
83          * 
84          * @return client handle
85          */
86         String getClientHandle();
87
88         /**
89          * 
90          * sets the client handle
91          * 
92          * @param handle
93          *            cleint hanlde
94          */
95         void setClientHandle(String handle);
96
97 }