code: public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
          Object object = null;
          try {
              if (locator instanceof FutureProxyTargetLocator) {
                  FutureProxyTargetLocator futureProxyTargetLocator = (FutureProxyTargetLocator) locator;
                  ProxyTarget target = futureProxyTargetLocator.locateProxyTarget(timeout, unit);
                  try {
                      object = target.getTarget();
                  } finally {
                      if (target instanceof ReleasableProxyTarget) {
                          // Sadly we don't know much what is done with the target by the caller, so we just release it
                          // right now
                          ((ReleasableProxyTarget) target).releaseTarget();
                      }
                  }
              } else {
                  // We just try to fetch it now...
                  object = get();
              }
          } catch (RuntimeException e) {
              LOG.trace("locating target failed, will return null then", e);
          }
          if (object == null) {
              throw new TimeoutException("can't locate target in given time frame");
          }
          return type.cast(object);
      }
docs: {@inheritDoc}