Img2PDFSvc.java
2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
* 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);
}
}