Package ai.mrs.mdp
Class MDPClient
java.lang.Object
ai.mrs.mdp.MDPClient
- All Implemented Interfaces:
MDPProtocol
public class MDPClient extends java.lang.Object implements MDPProtocol
-
Constructor Summary
Constructors Constructor Description MDPClient(java.lang.String uriStr, MDPHandler handler, java.util.Map<java.lang.String,java.lang.String> httpHeaders, int connectTimeout, long rpcTimeout, java.net.Proxy proxy) -
Method Summary
Modifier and Type Method Description java.util.MapcallRPC(java.lang.String event, java.util.Map data)voidclose()voidconnect()voidonClose(int code, java.lang.String reason, boolean remote)voidonError(java.lang.Exception ex)voidonMessage(java.lang.String message)voidonOpen()voidsend(java.lang.String msg)voidsendError(java.lang.String err)voidsendEvent(java.lang.String event, java.util.Map data)voidsendMessage(java.util.Map<java.lang.String,java.lang.Object> msg)
-
Constructor Details
-
MDPClient
public MDPClient(java.lang.String uriStr, MDPHandler handler, java.util.Map<java.lang.String,java.lang.String> httpHeaders, int connectTimeout, long rpcTimeout, java.net.Proxy proxy)
-
-
Method Details
-
sendMessage
public void sendMessage(java.util.Map<java.lang.String,java.lang.Object> msg)- Specified by:
sendMessagein interfaceMDPProtocol
-
sendEvent
public void sendEvent(java.lang.String event, java.util.Map data)- Specified by:
sendEventin interfaceMDPProtocol
-
callRPC
public java.util.Map callRPC(java.lang.String event, java.util.Map data)- Specified by:
callRPCin interfaceMDPProtocol
-
sendError
public void sendError(java.lang.String err)- Specified by:
sendErrorin interfaceMDPProtocol
-
connect
public void connect()- Specified by:
connectin interfaceMDPProtocol
-
close
public void close()- Specified by:
closein interfaceMDPProtocol
-
onOpen
public void onOpen()- Specified by:
onOpenin interfaceMDPProtocol
-
onClose
public void onClose(int code, java.lang.String reason, boolean remote)- Specified by:
onClosein interfaceMDPProtocol
-
onError
public void onError(java.lang.Exception ex)- Specified by:
onErrorin interfaceMDPProtocol
-
onMessage
public void onMessage(java.lang.String message)- Specified by:
onMessagein interfaceMDPProtocol
-
send
public void send(java.lang.String msg)
-