from java.lang import Exception as JavaException
from java.lang import Object
from org.python.core import PyFunction

class RequestWatcher:
    def block(self) -> bool: ...
    def compose(self, *args: RequestWatcher) -> RequestWatcher: ...

class Request(RequestWatcher):
    def block(self) -> bool: ...
    def cancel(self) -> None: ...
    def compose(self, *args: RequestWatcher) -> RequestWatcher: ...
    def get(self) -> Object: ...
    def getError(self) -> JavaException: ...
    def onError(self, func: PyFunction) -> None: ...
    def onSuccess(self, func: PyFunction) -> None: ...
