Broker模式类图(初始版)
2017-03-12 19:35:51 0 举报
Broker模式类图主要包括四个核心组件:Client、Request、Response和Broker。Client是请求的发送者,负责将请求发送给Broker;Request是客户端发出的具体请求,包含了请求的类型、内容等信息;Response是服务器对请求的响应,包含了响应的状态、数据等信息;Broker是请求的接收者和转发者,负责接收来自客户端的请求,根据请求的类型将请求转发给相应的处理器,并将处理器返回的响应结果返回给客户端。这四个组件之间的关系构成了Broker模式的基本结构。
作者其他创作
大纲/内容
key:
《interface》SecurityIntercepter
- preHandle()- postHandle()- afterCompletion()
关联
1
实现
HeartbeatController
Map brokerState
fault()
RequestSpecification
mapList: MapuserRequestList:userBrokerRequestListscheduleRequestList:scheduleBrokerRequestListchecker:HearbeatCheck
specifiyRequest(request)dispatchRequest(request)
DenyRecord
- denyList
- recordDeny()- handleDeny()
HeartbeatCheck
maxTimeInterval:int
cancelWarning()
n
client
requestDispatcher
UserBroker
+ BrokerList
- locateBroker()- locateClient()- registerBroker()- unregisterBroker()
Schedule1Cache
+Server
- getData
brokerMapping.xml定义请求和broker之间的对应关系
userBrokerRequestList
requestList:Listchecker:HearbeatCheck
addNewRequest(request)forwardRequest(request)
OrderMapping.xml定义OrderBroker和server之间的对应关系
ServerSafety
- requestList
- encyptData()- identityData()- controllResourceReq()
FaultMonitor
Log faultLog
-handle()
BrokerInterface
-respond
HeartbeatReceiver
-receive()
TimeCheck
Map processTime
-check()
TimeoutMonitor
Log timeoutLog
-reSchedule()
ScheduleServiceImpl
checker:HeartbeatChecker
searchRestTicket()getScheduleTimeTable()getRailways()
IEmitter
-send()
brokerMapping.xml定义broker和cache之间的对应关系
UserTicketServiceImpl
checker:HeartbeatCheckerlocator:ServiceLocatorencryptioner:DataEncryption
buyTicket()searchUnGoneOrder()TicketChange()TicketReturn()Login()LookAtMyOrder()
UserAuthority
- validateUser- authorizeUser- forbidUser
ScheduleService
依赖
UserTicketService
IBroker
-receive()-send()
聚合
TicketBroker
- locateBroker- locateServer- registerServer- registerBroker
RequestSpecificationService
ServiceLocater
findService(serviceName)
Bridge
- packData()- unpackData()- forwardMessage()
RequestDetection
- recordRequest()- filterRequest()- handleResponse()
AccountMapping.xml定义AccountBroker和server之间的对应关系
ScheduleBroker
+ ServerList
- locateServer()- locateClient()- registerServer()- unregisterServer()
HeartbeatEmitter
double rateMessage msg
DataEncryption
encryptData(data)
HeartbeatChecker
IReceiver
IntervalCheck
Map accetableSilence
OrderBroker
TicketMapping.xml定义TicketBroker和server之间的对应关系
VisitAuthorityChecker
checker:HeartbeatCheckeruserPart:UserTicketServiceImplschedulePart:ScheduleServiceImpl
findPresentUser()locateUserRange(user)
ProcessTimmer
-receive()-timeout()
...
SchedulenCache
AccountBroker
scheduleBrokerRequestList
0 条评论
下一页