public function generate(DescriptorInterface $descriptor)
    {

        // start generating the proxy
        ob_start();
        require __DIR__ . DIRECTORY_SEPARATOR . 'Proxy' . DIRECTORY_SEPARATOR . 'RemoteProxy.dhtml';
        $content = ob_get_clean();

        // prepare the proxy's filename
        $filename = sprintf('%s/%s', $this->getApplication()->getCacheDir(), $this->generateRemoteProxyFilename($descriptor));

        // query whether or not proxy's directory has to be created
        if (!is_dir($directory = dirname($filename))) {
            FileSystem::createDirectory($directory, 0755, true);
        }

        // write the proxy to the filesystem
        file_put_contents($filename, $content);

        // load the application instance
        $application = $this->getApplication();

        // register the proxy in the naming directory
        $application->getNamingDirectory()
                    ->bind(
                        sprintf('php:global/%s/%s/proxy', $application->getUniqueName(), $descriptor->getName()),
                        sprintf('%sRemoteProxy', $descriptor->getClassName())
                    );
    }
public function generate(DescriptorInterface $descriptor)
    {

        // start generating the proxy
        ob_start();
        require __DIR__ . DIRECTORY_SEPARATOR . 'Proxy' . DIRECTORY_SEPARATOR . 'RemoteProxy.dhtml';
        $content = ob_get_clean();

        // prepare the proxy's filename
        $filename = sprintf('%s/%s', $this->getApplication()->getCacheDir(), $this->generateRemoteProxyFilename($descriptor));

        // query whether or not proxy's directory has to be created
        if (!is_dir($directory = dirname($filename))) {
            FileSystem::createDirectory($directory, 0755, true);
        }

        // write the proxy to the filesystem
        file_put_contents($filename, $content);

        // load the application instance
        $application = $this->getApplication();

        // register the proxy in the naming directory
        $application->getNamingDirectory()
                    ->bind(
                        sprintf('php:global/%s/%s/proxy', $application->getUniqueName(), $descriptor->getName()),
                        sprintf('%sRemoteProxy', $descriptor->getClassName())
                    );
    }
public function generate ( DescriptorInterface $ descriptor ) { // start generating the proxy ob_start ( ) ; require __DIR__ . DIRECTORY_SEPARATOR . 'Proxy' . DIRECTORY_SEPARATOR . 'RemoteProxy.dhtml' ; $ content = ob_get_clean ( ) ; // prepare the proxy's filename $ filename = sprintf ( '%s/%s' , $ this -> getApplication ( ) -> getCacheDir ( ) , $ this -> generateRemoteProxyFilename ( $ descriptor ) ) ; // query whether or not proxy's directory has to be created if ( ! is_dir ( $ directory = dirname ( $ filename ) ) ) { FileSystem :: createDirectory ( $ directory , 0755 , true ) ; } // write the proxy to the filesystem file_put_contents ( $ filename , $ content ) ; // load the application instance $ application = $ this -> getApplication ( ) ; // register the proxy in the naming directory $ application -> getNamingDirectory ( ) -> bind ( sprintf ( 'php:global/%s/%s/proxy' , $ application -> getUniqueName ( ) , $ descriptor -> getName ( ) ) , sprintf ( '%sRemoteProxy' , $ descriptor -> getClassName ( ) ) ) ; }
Generate's a RMI proxy based on the passe descriptor information and
registers it in the naming directory.

@param \AppserverIo\Psr\Deployment\DescriptorInterface $descriptor The descriptor with the proxy data used for generation

@return void
@link https://github.com/appserver-io/rmi
Generate s a RMI proxy based on the passe descriptor information and registers it in the naming directory .