X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=packetcable-driver%2Fsrc%2Fmain%2Fjava%2Forg%2Fpcmm%2Frcd%2FIPCMMClient.java;fp=packetcable-driver%2Fsrc%2Fmain%2Fjava%2Forg%2Fpcmm%2Frcd%2FIPCMMClient.java;h=d1b13413faaab35601881a150b7dbef35b004b30;hb=d8838c4be428b277e68dfd7eebdb175ff395fe64;hp=0000000000000000000000000000000000000000;hpb=dce28aaf84df18b0964b7c1aaf731233f6785bf2;p=packetcable.git diff --git a/packetcable-driver/src/main/java/org/pcmm/rcd/IPCMMClient.java b/packetcable-driver/src/main/java/org/pcmm/rcd/IPCMMClient.java new file mode 100644 index 0000000..d1b1341 --- /dev/null +++ b/packetcable-driver/src/main/java/org/pcmm/rcd/IPCMMClient.java @@ -0,0 +1,97 @@ +/** + @header@ + */ + +package org.pcmm.rcd; + +import java.net.InetAddress; + +import org.umu.cops.stack.COPSMsg; + +/** + *

+ * This is a Client Type 1, which represents existing "legacy" endpoints (e.g., + * PC applications, gaming consoles) that lack specific QoS awareness or + * signaling capabilities. This client has no awareness of DOCSIS, CableHome, or + * PacketCable messaging, and hence no related requirements can be placed upon + * it. Client Type 1 communicates with an Application Manager to request + * service, and does not (cannot) request QoS resources directly from the MSO + * access network. + *

+ * + * + */ +public interface IPCMMClient { + + /** + * PCMM client-type + */ + static final short CLIENT_TYPE = (short) 0x800A; + + /** + * sends a message to the server. + * + * @param requestMessage + * request message. + */ + void sendRequest(COPSMsg requestMessage); + + /** + * Reads message from server + * + * @return COPS message + */ + COPSMsg readMessage(); + + /** + * tries to connect to the server. + * + * @param address + * server address + * @param port + * server port + * @return connection state + */ + boolean tryConnect(String address, int port); + + /** + * tries to connect to the server. + * + * @param address + * server address + * @param port + * server port + * @return connection state + */ + boolean tryConnect(InetAddress address, int port); + + /** + * disconnects from server. + * + * @return disconnection status. + */ + boolean disconnect(); + + /** + * + * @return whether the client is connected to the server of not. + */ + boolean isConnected(); + + /** + * gets the client handle + * + * @return client handle + */ + String getClientHandle(); + + /** + * + * sets the client handle + * + * @param handle + * cleint hanlde + */ + void setClientHandle(String handle); + +}