code: public static Object createShutdownProxy(Object o,
                                             Class[] interfaces,
                                             Shutdown shutdown)
    {
      if(interfaces == null)
        interfaces = ReflectUtils.extractAllInterfaces(o);
  
      return Proxy.newProxyInstance(o.getClass().getClassLoader(),
                                    interfaces,
                                    new ShutdownProxy(o, shutdown));
  
    }
docs: Creates the proxy to check for shutdown.
  
  @param o
  @param interfaces restriction on which interface to apply the proxy on
  @param shutdown
  @return the proxy