blob: d021eb5a79c5d614fc8b73511b957264e1761e69 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.handler;
public interface DelegatedRequestHandler extends RequestHandler {
RequestHandler getDelegate();
default RequestHandler getDelegateRecursive() {
RequestHandler delegate = getDelegate();
while(delegate instanceof DelegatedRequestHandler) {
delegate = ((DelegatedRequestHandler) delegate).getDelegate();
}
return delegate;
}
}
|