Selector类
类图
@startuml
interface Closeable{
+ void close()
}
interface AutoCloseable{
+ void close()
}
abstract class Selector{
# Selector()
+ Selector open()
+ boolean isOpen()
+ SelectorProvider provider()
+ Set<SelectionKey> keys()
+ Set<SelectionKey> selectedKeys()
+ int selectNow()
+ int select()
+ int select(long timeout)
+ Selector wakeup()
+ void close()
}
abstract class AbstractSelector{
+ AtomicBoolean selectorOpen
- SelectorProvider provider
- Set<SelectionKey> cancelledKeys
- Interruptible interruptor
# AbstractSelector(SelectorProvider provider)
# void begin()
# void end()
}
abstract class SelectorImpl{
# Set<SelectionKey> selectedKeys
# HashSet<SelectionKey> keys
# Set<SelectionKey> publicKeys
# Set<SelectionKey> publicSelectedKeys
# SelectorImpl(SelectorProvider var1)
# Set<SelectionKey> keys()
# Set<SelectionKey> selectedKeys()
}
class WindowsSelectorImpl {
}
abstract class SelectionKey {
# SelectionKey()
+ SelectableChannel channel()
+ Selector selector()
+ boolean isValid()
+ void cancel()
+ int interestOps()
+ SelectionKey interestOps(int ops)
+ int readyOps()
}
Selector <|-- AbstractSelector
AutoCloseable <|-- Closeable
Closeable <|-- Selector
AbstractSelector <|-- SelectorImpl
SelectorImpl <|-- WindowsSelectorImpl
SelectionKey <.. Selector
SelectionKey <.. SelectorImpl
SelectionKey <.. AbstractSelector
SelectionKey <.. WindowsSelectorImpl
@enduml
selector.png
网友评论