socket通信bio多线程UML类图
2020-04-01 09:54:31 2 举报
socket通信bio多线程ULM类图
作者其他创作
大纲/内容
Thread
WatchingGoServer
- final logger:Logger= LoggerFactory.getLogger(WatchingGoServer.class)
+WatchingGoServer(ServerConfig serverConfig) :WatchingGoServer+ getLogger() :Logger+ createSession(Socket clientSocket) :AbstractSession
ServerSocket
AbstractServer
- serverConfig :ServerConfig- serverSocket :ServerSocket- sessionManager :SessionManager- listenThread :AbstractStoppableThread
+ AbstractServer(ServerConfig serverConfig) :AbstractServer+ getServerConfig() :ServerConfig + getSessionManager() :SessionManager+ start() :void+ stop() :void- closeSocket() :void+ getLogger() :Logger+ createSession(Socket clientSocket) :AbstractSession
AbstractStoppableThread
- volatile stopFlag:boolean = false- loopInterval:int = 0
+ getStopFlag():boolean+ getLoopInterval():int+ setLoopInterval(int loopInterval):void+ final run():void+ isRunning():boolean+ requestStop():void+ requestStop(boolean interrupt):void+ waitForStop():void+ waitForStop(int milliseconds):boolean# startUp():void# cleanUp():void+ getLogger():Logger# runInLoop():void
NmosServer
- final logger:Logger= LoggerFactory.getLogger(NmosServer.class)
+ NmosServer(ServerConfig serverConfig) :NmosServer+ getLogger() :Logger+ createSession(Socket clientSocket) :AbstractSession
AbstractSession
- final MAX_RECEIVED_BYTES_SIZE:int = 1024 * 100- final RECEIVE_BUFFER_SIZE:int = 1024 * 4- sendLock:Object = new Object()- server:AbstractServer - socket:Socket- inputStream:InputStream - outputStream: OutputStream- remoteAddress:String- charset:Charset - startReceiveThread:boolean - heartbeatIntervalSeconds:int- lastActiveTime:long- receiveThread:AbstractStoppableThread = new AbstractStoppableThread(){}- heartbeatThread:AbstractStoppableThread = new AbstractStoppableThread(){}
SessionManager
- logger:Logger = LoggerFactory.getLogger(SessionManager.class)- final int CHECK_INTERVAL = 1000- activeSessions:ArrayList<AbstractSession>- abnormalSessions:ArrayList<AbstractSession>
+ SessionManager():SessionManager+ getActiveSessions():ArrayList<AbstractSession>+ add(AbstractSession session):void- clear(ArrayList<AbstractSession> sessions):void+ clearAll():void+ getLogger():Logger# runInLoop():void# cleanUp():void
ServerConfig
收藏
收藏
0 条评论
下一页