Img2PDFSvc.java 2.67 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  com.adobe.native2pdf.bmc.ConverterBslJService
 *  com.adobe.native2pdf.bmc.ConverterBslJServiceProcessFactoryManager
 *  org.apache.felix.scr.annotations.Component
 *  org.apache.felix.scr.annotations.Property
 *  org.apache.felix.scr.annotations.Service
 *  org.apache.sling.commons.osgi.OsgiUtil
 */
package com.adobe.image2pdf.bmc;

import com.adobe.image2pdf.bmc.Img2PDFSvcMBean;
import com.adobe.native2pdf.bmc.ConverterBslJService;
import com.adobe.native2pdf.bmc.ConverterBslJServiceProcessFactoryManager;
import java.io.File;
import java.io.IOException;
import java.util.Map;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Service;
import org.apache.sling.commons.osgi.OsgiUtil;

@Component(metatype=1, immediate=1, label="%img2pdf.bmc.name", description="%img2pdf.bmc.description", inherit=1)
@Service
public class Img2PDFSvc
extends ConverterBslJService
implements Img2PDFSvcMBean {
    private static final String DEFAULT_JVM_OPTIONS = "-Xmx128m";
    @Property(value={"-Xmx128m"})
    private static final String PROP_JVM_OPTIONS = "pdfg.bmc.jvmOptions";
    private String m_ExecutableName = "com.adobe.image2pdf.bmc.Img2PDFConverterServer";

    public Img2PDFSvc() {
        this.m_MainClassArg = "com.adobe.image2pdf.bmc.Img2PDFConverterServer";
    }

    protected synchronized void copyConfigResources(File persistentDir) throws IOException {
    }

    protected void initializeConfig(Map config) {
        super.initializeConfig(config);
        String jvmOptions = OsgiUtil.toString(config.get("pdfg.bmc.jvmOptions"), (String)"-Xmx128m");
        this.setJVMOptions(jvmOptions);
    }

    public boolean getDebug() {
        return super.getDebug();
    }

    public int getMaximumReUseCount() {
        return super.getMaximumReUseCount();
    }

    public String getORBParams() {
        return super.getORBParams();
    }

    public int getPoolMax() {
        return super.getPoolMax();
    }

    public void setDebug(boolean debug) {
        super.setDebug(debug);
    }

    public void setMaximumReUseCount(int count) {
        super.setMaximumReUseCount(count);
    }

    public void setORBParams(String params) {
        super.setORBParams(params);
    }

    public void setPoolMax(int newMax) {
        super.setPoolMax(newMax);
    }

    protected synchronized void updateCommandLine() {
        this.mProcessFactoryManager.setExecutableName(this.m_ExecutableName);
        this.mProcessFactoryManager.setJVMArgs(this.m_JVMOptions);
        this.mProcessFactoryManager.setClassPath(this.m_AutoClassPathJars);
    }
}