RPC类图
2015-12-30 19:54:50 46 举报
RPC(Remote Procedure Call)类图是一种用于描述远程过程调用的类图。它展示了客户端和服务器之间的交互,以及它们之间传递的消息。RPC类图中通常包含以下几个部分:客户端、服务器、接口和方法。客户端负责发起请求,服务器负责处理请求并返回结果。接口定义了客户端和服务器之间可以调用的方法,而方法则描述了具体的操作。RPC类图可以帮助开发人员更好地理解系统的架构和设计,从而更容易地进行开发和维护。总之,RPC类图是一种非常有用的工具,可以帮助开发人员更好地理解和设计远程过程调用系统。
作者其他创作
大纲/内容
RpcInvocationHandler
+ ConnectionId getConnectionId()
Reader
- Selector readSelector
+ run- doRunLoop
java.lang.reflect.InvocationHandler
Client.Connection
- setupConnection- setupIOstreams- closeConnection- writeConnectionHeader- sendPing+ void sendRpcRequest(final Call call)
RpcEngine
+ ProtocolProxy getProxy()+ RPC.Server getServer()+ getProtocolMetaInfoProxy()
Connection
+ attribute1:type = defaultValue+ attribute2:type- attribute3:type
+ readAndProcess- processOneRpc- processRpcRequest
RpcRequestWrapper
ExceptionsHandler
Responder
- Selector writeSelector- int pending
+ run- doRunLoop- doAsyncWrite- processResponse
Client
- ThreadLocal callId - ThreadLocal retryCount- connections
RPC.RpcInvoker
Writable call()
Listener
- acceptChannel- selector- address
+ run+ doAccept+ doRead+ doStop- cleanupConnections- closeCurrentConnection
RPC
+ RpcEngine getProtocolEngine+ T getProxy
Thread
RpcWrapper
- channel- data
+ readAndProcess- processOneRpc
WritableRpcEngine.Invoker
- ConnectionId remoteId
+ Object invoke
Writable
WritableRpcEngine.Server.WritableRpcInvoker
ProtobufRpcEngine
ProtocolProxy
- Class protocol- T proxy- serverMethods
+ T getProxy() + boolean isMethodSupported
ProtobufRpcEngine.Server.ProtoBufRpcInvoker
WritableRpcEngine.Server
Handler
+ run
RPC.Builder
- protocol- instance- bindAddress- port
+ build
WritableRpcEngine
void initialize()
RPC.Server
+ addProtocol()+ Writable call ()
ProtobufRpcEngine.Server
RpcMessageWithHeader
Client.Call
- int id- int retry- RPC.RpcKind rpcKind- Writable rpcRequest- Writable rpcResponse- boolean done- IOException error
Server
+ registerProtocolEngine()+ RpcInvoker getRpcInvoker()+ bind+ addTerseExceptions()+ void start()+ void stop()+ void join()+ abstract Writable call()
ProtobufRpcEngine.Invoker
Invocation
0 条评论
下一页