private MethodRefAmp findLocalMethod()
  {
    ServiceRefAmp serviceRefLocal = _serviceRef.getLocalService();
    
    if (serviceRefLocal == null) {
      return null;
    }
    
    MethodRefActive methodRefLocal = _methodRefLocal;
    MethodRefAmp methodRef;
    
    if (methodRefLocal != null) {
      methodRef = methodRefLocal.getMethod(serviceRefLocal);
      
      if (methodRef != null) {
        return methodRef;
      }
    }

    if (_type != null) {
      methodRef = serviceRefLocal.methodByName(_name, _type);
    }
    else {
      methodRef = serviceRefLocal.methodByName(_name);
    }
    
    _methodRefLocal = new MethodRefActive(serviceRefLocal, methodRef);
    
    return methodRef;
  }
private MethodRefAmp findLocalMethod ( ) { ServiceRefAmp serviceRefLocal = _serviceRef . getLocalService ( ) ; if ( serviceRefLocal == null ) { return null ; } MethodRefActive methodRefLocal = _methodRefLocal ; MethodRefAmp methodRef ; if ( methodRefLocal != null ) { methodRef = methodRefLocal . getMethod ( serviceRefLocal ) ; if ( methodRef != null ) { return methodRef ; } } if ( _type != null ) { methodRef = serviceRefLocal . methodByName ( _name , _type ) ; } else { methodRef = serviceRefLocal . methodByName ( _name ) ; } _methodRefLocal = new MethodRefActive ( serviceRefLocal , methodRef ) ; return methodRef ; }
/*
@Override
public <T> void stream(Headers headers,
ResultStream<T> result,
long timeout, TimeUnit timeUnit,
Object... args)
{
try {
MethodRefAmp method = findActiveMethod();

method.stream(headers, result, timeout, timeUnit, args);
} catch (Throwable e) {
result.fail(e);
}
}