Update URM Version to 1.4.4 and regenerated all puml files
This commit is contained in:
@ -1,46 +1,4 @@
|
||||
@startuml
|
||||
package com.iluwatar.reactor.app {
|
||||
class App {
|
||||
- channels : List<AbstractNioChannel>
|
||||
- dispatcher : Dispatcher
|
||||
- reactor : NioReactor
|
||||
+ App(dispatcher : Dispatcher)
|
||||
+ main(args : String[]) {static}
|
||||
+ start()
|
||||
+ stop()
|
||||
- tcpChannel(port : int, handler : ChannelHandler) : AbstractNioChannel
|
||||
- udpChannel(port : int, handler : ChannelHandler) : AbstractNioChannel
|
||||
}
|
||||
class LoggingHandler {
|
||||
- ACK : byte[] {static}
|
||||
+ LoggingHandler()
|
||||
- doLogging(data : ByteBuffer) {static}
|
||||
+ handleChannelRead(channel : AbstractNioChannel, readObject : Object, key : SelectionKey)
|
||||
- sendReply(channel : AbstractNioChannel, incomingPacket : DatagramPacket, key : SelectionKey) {static}
|
||||
- sendReply(channel : AbstractNioChannel, key : SelectionKey) {static}
|
||||
}
|
||||
~class TcpLoggingClient {
|
||||
- clientName : String
|
||||
- serverPort : int
|
||||
+ TcpLoggingClient(clientName : String, serverPort : int)
|
||||
+ run()
|
||||
- sendLogRequests(writer : PrintWriter, inputStream : InputStream)
|
||||
}
|
||||
~class UdpLoggingClient {
|
||||
- clientName : String
|
||||
- remoteAddress : InetSocketAddress
|
||||
+ UdpLoggingClient(clientName : String, port : int)
|
||||
+ run()
|
||||
}
|
||||
class AppClient {
|
||||
- service : ExecutorService
|
||||
+ AppClient()
|
||||
- artificialDelayOf(millis : long) {static}
|
||||
+ main(args : String[]) {static}
|
||||
+ start()
|
||||
+ stop()
|
||||
}
|
||||
}
|
||||
package com.iluwatar.reactor.framework {
|
||||
abstract class AbstractNioChannel {
|
||||
- channel : SelectableChannel
|
||||
@ -58,17 +16,15 @@ package com.iluwatar.reactor.framework {
|
||||
~ setReactor(reactor : NioReactor)
|
||||
+ write(data : Object, key : SelectionKey)
|
||||
}
|
||||
~class ChangeKeyOpsCommand {
|
||||
- interestedOps : int
|
||||
- key : SelectionKey
|
||||
+ ChangeKeyOpsCommand(this$0 : SelectionKey, key : int)
|
||||
+ run()
|
||||
+ toString() : String
|
||||
}
|
||||
interface ChannelHandler {
|
||||
+ handleChannelRead(AbstractNioChannel, Object, SelectionKey) {abstract}
|
||||
}
|
||||
interface Dispatcher {
|
||||
+ onChannelReadEvent(AbstractNioChannel, Object, SelectionKey) {abstract}
|
||||
+ stop() {abstract}
|
||||
}
|
||||
class NioDatagramChannel {
|
||||
- LOGGER : Logger {static}
|
||||
- port : int
|
||||
+ NioDatagramChannel(port : int, handler : ChannelHandler)
|
||||
+ bind()
|
||||
@ -78,30 +34,6 @@ package com.iluwatar.reactor.framework {
|
||||
+ read(key : SelectionKey) : DatagramPacket
|
||||
+ write(data : Object, key : SelectionKey)
|
||||
}
|
||||
class ThreadPoolDispatcher {
|
||||
- executorService : ExecutorService
|
||||
+ ThreadPoolDispatcher(poolSize : int)
|
||||
+ onChannelReadEvent(channel : AbstractNioChannel, readObject : Object, key : SelectionKey)
|
||||
+ stop()
|
||||
}
|
||||
class NioServerSocketChannel {
|
||||
- port : int
|
||||
+ NioServerSocketChannel(port : int, handler : ChannelHandler)
|
||||
+ bind()
|
||||
# doWrite(pendingWrite : Object, key : SelectionKey)
|
||||
+ getInterestedOps() : int
|
||||
+ getJavaChannel() : ServerSocketChannel
|
||||
+ read(key : SelectionKey) : ByteBuffer
|
||||
}
|
||||
class SameThreadDispatcher {
|
||||
+ SameThreadDispatcher()
|
||||
+ onChannelReadEvent(channel : AbstractNioChannel, readObject : Object, key : SelectionKey)
|
||||
+ stop()
|
||||
}
|
||||
interface Dispatcher {
|
||||
+ onChannelReadEvent(AbstractNioChannel, Object, SelectionKey) {abstract}
|
||||
+ stop() {abstract}
|
||||
}
|
||||
class DatagramPacket {
|
||||
- data : ByteBuffer
|
||||
- receiver : SocketAddress
|
||||
@ -114,6 +46,7 @@ package com.iluwatar.reactor.framework {
|
||||
+ setSender(sender : SocketAddress)
|
||||
}
|
||||
class NioReactor {
|
||||
- LOGGER : Logger {static}
|
||||
- dispatcher : Dispatcher
|
||||
- pendingCommands : Queue<Runnable>
|
||||
- reactorMain : ExecutorService
|
||||
@ -131,6 +64,78 @@ package com.iluwatar.reactor.framework {
|
||||
+ start()
|
||||
+ stop()
|
||||
}
|
||||
~class ChangeKeyOpsCommand {
|
||||
- interestedOps : int
|
||||
- key : SelectionKey
|
||||
+ ChangeKeyOpsCommand(this$0 : SelectionKey, key : int)
|
||||
+ run()
|
||||
+ toString() : String
|
||||
}
|
||||
class NioServerSocketChannel {
|
||||
- LOGGER : Logger {static}
|
||||
- port : int
|
||||
+ NioServerSocketChannel(port : int, handler : ChannelHandler)
|
||||
+ bind()
|
||||
# doWrite(pendingWrite : Object, key : SelectionKey)
|
||||
+ getInterestedOps() : int
|
||||
+ getJavaChannel() : ServerSocketChannel
|
||||
+ read(key : SelectionKey) : ByteBuffer
|
||||
}
|
||||
class SameThreadDispatcher {
|
||||
+ SameThreadDispatcher()
|
||||
+ onChannelReadEvent(channel : AbstractNioChannel, readObject : Object, key : SelectionKey)
|
||||
+ stop()
|
||||
}
|
||||
class ThreadPoolDispatcher {
|
||||
- executorService : ExecutorService
|
||||
+ ThreadPoolDispatcher(poolSize : int)
|
||||
+ onChannelReadEvent(channel : AbstractNioChannel, readObject : Object, key : SelectionKey)
|
||||
+ stop()
|
||||
}
|
||||
}
|
||||
package com.iluwatar.reactor.app {
|
||||
class App {
|
||||
- channels : List<AbstractNioChannel>
|
||||
- dispatcher : Dispatcher
|
||||
- reactor : NioReactor
|
||||
+ App(dispatcher : Dispatcher)
|
||||
+ main(args : String[]) {static}
|
||||
+ start()
|
||||
+ stop()
|
||||
- tcpChannel(port : int, handler : ChannelHandler) : AbstractNioChannel
|
||||
- udpChannel(port : int, handler : ChannelHandler) : AbstractNioChannel
|
||||
}
|
||||
class AppClient {
|
||||
- LOGGER : Logger {static}
|
||||
- service : ExecutorService
|
||||
+ AppClient()
|
||||
- artificialDelayOf(millis : long) {static}
|
||||
+ main(args : String[]) {static}
|
||||
+ start()
|
||||
+ stop()
|
||||
}
|
||||
~class TcpLoggingClient {
|
||||
- clientName : String
|
||||
- serverPort : int
|
||||
+ TcpLoggingClient(clientName : String, serverPort : int)
|
||||
+ run()
|
||||
- sendLogRequests(writer : PrintWriter, inputStream : InputStream)
|
||||
}
|
||||
~class UdpLoggingClient {
|
||||
- clientName : String
|
||||
- remoteAddress : InetSocketAddress
|
||||
+ UdpLoggingClient(clientName : String, port : int)
|
||||
+ run()
|
||||
}
|
||||
class LoggingHandler {
|
||||
- ACK : byte[] {static}
|
||||
- LOGGER : Logger {static}
|
||||
+ LoggingHandler()
|
||||
- doLogging(data : ByteBuffer) {static}
|
||||
+ handleChannelRead(channel : AbstractNioChannel, readObject : Object, key : SelectionKey)
|
||||
- sendReply(channel : AbstractNioChannel, incomingPacket : DatagramPacket, key : SelectionKey) {static}
|
||||
- sendReply(channel : AbstractNioChannel, key : SelectionKey) {static}
|
||||
}
|
||||
}
|
||||
AbstractNioChannel --> "-handler" ChannelHandler
|
||||
UdpLoggingClient ..+ AppClient
|
||||
@ -140,12 +145,11 @@ NioReactor --> "-dispatcher" Dispatcher
|
||||
App --> "-reactor" NioReactor
|
||||
App --> "-channels" AbstractNioChannel
|
||||
DatagramPacket ..+ NioDatagramChannel
|
||||
LoggingHandler --+ NioDatagramChannel
|
||||
App --> "-dispatcher" Dispatcher
|
||||
ChangeKeyOpsCommand --+ NioReactor
|
||||
NioDatagramChannel --|> AbstractNioChannel
|
||||
LoggingHandler ..|> ChannelHandler
|
||||
ThreadPoolDispatcher ..|> Dispatcher
|
||||
NioDatagramChannel --|> AbstractNioChannel
|
||||
NioServerSocketChannel --|> AbstractNioChannel
|
||||
SameThreadDispatcher ..|> Dispatcher
|
||||
ThreadPoolDispatcher ..|> Dispatcher
|
||||
@enduml
|
Reference in New Issue
Block a user