code: public void shutdown(StubAmp actor,
                         ShutdownModeAmp mode)
    {
      try {
        MethodAmp shutdown = _onShutdown;
        
        if (shutdown != null && ShutdownModeAmp.GRACEFUL == mode) {
          shutdown.send(HeadersNull.NULL, actor, mode);
        }
      } catch (Throwable e) {
        e.printStackTrace();
        log.log(Level.FINE, e.toString(), e);
      }
    }
docs: /*
  private Object toSubscribeArg(Class<?> api, ServiceRef serviceRef)
  {
  if (api.isAssignableFrom(serviceRef.getClass())) {
  return serviceRef;
  }
  else {
  return serviceRef.as(api);
  }
  }