Class InterruptibleProxy

  • All Implemented Interfaces:
    DelegatingInvocationHandler, InvocationHandler

    public final class InterruptibleProxy
    extends Object
    implements DelegatingInvocationHandler
    Proxy that calls the requested method in another thread waits on a Future. If the calling thread is interrupted, this proxy will throw a PalantirInterruptedException. If given the CancelDelgate#Cancel option, it will also interrupt the delegated thread.