code: public void registerExtension(Extension extension) throws RuntimeFault, RemoteException {
          if (extension == null) {
              throw new NullPointerException();
          }
          encodeUrl(extension);
          getVimService().registerExtension(getMOR(), extension);
      }
docs: Register a new plugin If <code>extension</code> is null then a
  <code>NullPointerException</code> is thrown.
  
  @param extension The extension object to be registered
  @throws RemoteException
  @throws RuntimeFault    either because of the web service itself, or because of the
  service provider unable to handle the request.