public abstract class AbstractRpcProtocol extends java.lang.Object implements IRpcProtocol
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
applicationSegment |
protected BrokerException |
brokerException |
protected java.lang.String |
currentReceivedData |
protected java.lang.String |
currentRemoteProcedure |
protected java.lang.String |
currentSentData |
protected java.lang.String |
dataSegment |
protected java.lang.String |
errorMessage |
protected IRpcBrokerEventHandler |
eventHandler |
protected int |
protocolVersion |
protected java.lang.String |
rpcVersion |
protected java.lang.String |
securitySegment |
protected SocketConnection |
socket |
RPC_VERSION, XWB_BAD_SIGN_ON, XWB_BASE_ERR, XWB_BLD_CONNECT_LIST, XWB_CONNECT_REFUSED, XWB_DISCONNECTED_WITH_BYE, XWB_M_REJECT, XWB_NO_CONNECTION_TO_SERVER, XWB_NO_DATA_RECEIVED, XWB_NO_HEAP, XWB_NULL_RPC_VER, XWB_RPC_NOT_REG, XWB_UNABLE_TO_CREATE_CONTEXT| Constructor and Description |
|---|
AbstractRpcProtocol(int protocolVersion) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
call(java.lang.String remoteProcedure,
Params params) |
abstract boolean |
connect(java.lang.String server,
int port) |
BrokerException |
createBrokerException(java.lang.Exception e,
java.lang.String action,
int code) |
boolean |
disconnect() |
java.lang.String |
getApplicationSegment() |
BrokerException |
getBrokerException() |
java.lang.String |
getDataSegment() |
java.lang.String |
getErrorMessage() |
IRpcBrokerEventHandler |
getEventHandler() |
int |
getProtocolVersion() |
java.lang.String |
getRpcVersion() |
java.lang.String |
getSecuritySegment() |
protected java.lang.String |
getServerPacket() |
boolean |
isConnected() |
void |
onSocketConnect() |
void |
onSocketDisconnect() |
void |
onSocketException(java.lang.Exception e) |
void |
setEventHandler(IRpcBrokerEventHandler eventHandler) |
void |
setRpcVersion(java.lang.String rpcVersion) |
protected int protocolVersion
protected java.lang.String rpcVersion
protected SocketConnection socket
protected IRpcBrokerEventHandler eventHandler
protected java.lang.String securitySegment
protected java.lang.String applicationSegment
protected java.lang.String dataSegment
protected java.lang.String errorMessage
protected BrokerException brokerException
protected java.lang.String currentRemoteProcedure
protected java.lang.String currentSentData
protected java.lang.String currentReceivedData
public int getProtocolVersion()
getProtocolVersion in interface IRpcProtocolpublic java.lang.String getRpcVersion()
getRpcVersion in interface IRpcProtocolpublic void setRpcVersion(java.lang.String rpcVersion)
setRpcVersion in interface IRpcProtocolpublic java.lang.String getSecuritySegment()
getSecuritySegment in interface IRpcProtocolpublic java.lang.String getApplicationSegment()
getApplicationSegment in interface IRpcProtocolpublic java.lang.String getDataSegment()
getDataSegment in interface IRpcProtocolpublic java.lang.String getErrorMessage()
getErrorMessage in interface IRpcProtocolpublic BrokerException getBrokerException()
getBrokerException in interface IRpcProtocolpublic boolean isConnected()
isConnected in interface IRpcProtocolpublic IRpcBrokerEventHandler getEventHandler()
getEventHandler in interface IRpcProtocolpublic void setEventHandler(IRpcBrokerEventHandler eventHandler)
setEventHandler in interface IRpcProtocolpublic BrokerException createBrokerException(java.lang.Exception e, java.lang.String action, int code)
createBrokerException in interface IRpcProtocolprotected java.lang.String getServerPacket()
throws BrokerException
BrokerExceptionpublic abstract boolean connect(java.lang.String server,
int port)
throws BrokerException
connect in interface IRpcProtocolBrokerExceptionpublic java.lang.String call(java.lang.String remoteProcedure,
Params params)
throws BrokerException
call in interface IRpcProtocolBrokerExceptionpublic boolean disconnect()
throws BrokerException
disconnect in interface IRpcProtocolBrokerExceptionpublic void onSocketConnect()
public void onSocketDisconnect()
public void onSocketException(java.lang.Exception e)