import typing

import java
import java.lang
import java.net
import java.nio.channels
import java.util
import java.util.concurrent

class AbstractInterruptibleChannel(java.nio.channels.Channel, java.nio.channels.InterruptibleChannel):
    def __init__(self) -> None: ...
    def begin(self) -> None: ...
    def close(self) -> None: ...
    def end(self, completed: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def implCloseChannel(self) -> None: ...
    def isOpen(self) -> bool: ...

class AbstractSelectableChannel(java.nio.channels.SelectableChannel):
    def __init__(self, provider: SelectorProvider, /) -> None: ...
    def blockingLock(self) -> java.lang.Object: ...
    def configureBlocking(self, block: bool | java.jboolean | java.lang.Boolean, /) -> java.nio.channels.SelectableChannel: ...
    def implCloseChannel(self) -> None: ...
    def implCloseSelectableChannel(self) -> None: ...
    def implConfigureBlocking(self, arg1: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def isBlocking(self) -> bool: ...
    def isRegistered(self) -> bool: ...
    def keyFor(self, sel: java.nio.channels.Selector, /) -> java.nio.channels.SelectionKey: ...
    def provider(self) -> SelectorProvider: ...
    def register(self, sel: java.nio.channels.Selector, ops: int | java.jint | java.lang.Integer, att: java.lang.Object | int | bool | float | str, /) -> java.nio.channels.SelectionKey: ...

class AbstractSelectionKey(java.nio.channels.SelectionKey):
    def __init__(self) -> None: ...
    def cancel(self) -> None: ...
    def isValid(self) -> bool: ...

class AbstractSelector(java.nio.channels.Selector):
    def __init__(self, provider: SelectorProvider, /) -> None: ...
    def begin(self) -> None: ...
    def cancelledKeys(self) -> java.util.Set[java.nio.channels.SelectionKey]: ...
    def close(self) -> None: ...
    def deregister(self, key: AbstractSelectionKey, /) -> None: ...
    def end(self) -> None: ...
    def implCloseSelector(self) -> None: ...
    def isOpen(self) -> bool: ...
    def provider(self) -> SelectorProvider: ...
    def register(self, arg1: AbstractSelectableChannel, arg2: int | java.jint | java.lang.Integer, arg3: java.lang.Object | int | bool | float | str, /) -> java.nio.channels.SelectionKey: ...

class AsynchronousChannelProvider(java.lang.Object):
    def __init__(self) -> None: ...
    @typing.overload
    def openAsynchronousChannelGroup(self, arg1: int | java.jint | java.lang.Integer, arg2: java.util.concurrent.ThreadFactory, /) -> java.nio.channels.AsynchronousChannelGroup: ...
    @typing.overload
    def openAsynchronousChannelGroup(self, arg1: java.util.concurrent.ExecutorService, arg2: int | java.jint | java.lang.Integer, /) -> java.nio.channels.AsynchronousChannelGroup: ...
    def openAsynchronousServerSocketChannel(self, arg1: java.nio.channels.AsynchronousChannelGroup, /) -> java.nio.channels.AsynchronousServerSocketChannel: ...
    def openAsynchronousSocketChannel(self, arg1: java.nio.channels.AsynchronousChannelGroup, /) -> java.nio.channels.AsynchronousSocketChannel: ...
    @staticmethod
    def provider() -> AsynchronousChannelProvider: ...

class SelectorProvider(java.lang.Object):
    def __init__(self) -> None: ...
    def inheritedChannel(self) -> java.nio.channels.Channel: ...
    @typing.overload
    def openDatagramChannel(self) -> java.nio.channels.DatagramChannel: ...
    @typing.overload
    def openDatagramChannel(self, arg1: java.net.ProtocolFamily, /) -> java.nio.channels.DatagramChannel: ...
    def openPipe(self) -> java.nio.channels.Pipe: ...
    def openSelector(self) -> AbstractSelector: ...
    def openServerSocketChannel(self) -> java.nio.channels.ServerSocketChannel: ...
    def openSocketChannel(self) -> java.nio.channels.SocketChannel: ...
    @staticmethod
    def provider() -> SelectorProvider: ...
