101 lines
3.3 KiB
Java
101 lines
3.3 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* com.tridium.platform.daemon.BDaemonSession
|
|
* com.tridium.platform.daemon.message.DaemonMessage
|
|
* javax.baja.security.AuthenticationException
|
|
* javax.baja.sys.BComponent
|
|
* javax.baja.sys.Sys
|
|
* javax.baja.sys.Type
|
|
* javax.baja.xml.XElem
|
|
* javax.baja.xml.XParser
|
|
*/
|
|
package com.tridium.platcrypto.daemon;
|
|
|
|
import com.tridium.platcrypto.daemon.messages.CryptoServletMessage;
|
|
import com.tridium.platform.daemon.BDaemonSession;
|
|
import com.tridium.platform.daemon.message.DaemonMessage;
|
|
import java.io.InputStream;
|
|
import java.net.ConnectException;
|
|
import javax.baja.security.AuthenticationException;
|
|
import javax.baja.sys.BComponent;
|
|
import javax.baja.sys.Sys;
|
|
import javax.baja.sys.Type;
|
|
import javax.baja.xml.XElem;
|
|
import javax.baja.xml.XParser;
|
|
|
|
/*
|
|
* Illegal identifiers - consider using --renameillegalidents true
|
|
*/
|
|
public abstract class BPlatCryptoBase
|
|
extends BComponent {
|
|
public static final Type TYPE;
|
|
private BDaemonSession session;
|
|
static /* synthetic */ Class class$com$tridium$platcrypto$daemon$BPlatCryptoBase;
|
|
|
|
public Type getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
public XElem send(CryptoServletMessage cryptoServletMessage) throws ConnectException, AuthenticationException {
|
|
try {
|
|
if (cryptoServletMessage.getMethod().equals("POST")) {
|
|
return this.getDaemonSession().post((DaemonMessage)cryptoServletMessage);
|
|
}
|
|
InputStream inputStream = this.getDaemonSession().getInputStream((DaemonMessage)cryptoServletMessage);
|
|
XParser xParser = XParser.make((InputStream)inputStream);
|
|
if (xParser != null) {
|
|
return xParser.parse();
|
|
}
|
|
}
|
|
catch (Exception exception) {}
|
|
return null;
|
|
}
|
|
|
|
public XElem[] send(CryptoServletMessage cryptoServletMessage, String string) throws Exception {
|
|
XElem xElem;
|
|
InputStream inputStream = this.getDaemonSession().getInputStream((DaemonMessage)cryptoServletMessage);
|
|
XParser xParser = XParser.make((InputStream)inputStream);
|
|
if (xParser != null && (xElem = xParser.parse()) != null) {
|
|
XElem[] xElemArray = xElem.elems(string);
|
|
return xElemArray;
|
|
}
|
|
return new XElem[0];
|
|
}
|
|
|
|
public BDaemonSession getDaemonSession() {
|
|
return this.session;
|
|
}
|
|
|
|
static /* synthetic */ Class class(String string, boolean bl) {
|
|
try {
|
|
Class<?> clazz = Class.forName(string);
|
|
if (!bl) {
|
|
clazz = clazz.getComponentType();
|
|
}
|
|
return clazz;
|
|
}
|
|
catch (ClassNotFoundException classNotFoundException) {
|
|
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
|
}
|
|
}
|
|
|
|
public BPlatCryptoBase() throws UnsupportedOperationException {
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
|
|
public BPlatCryptoBase(BDaemonSession bDaemonSession) {
|
|
this.session = bDaemonSession;
|
|
}
|
|
|
|
static {
|
|
Class clazz = class$com$tridium$platcrypto$daemon$BPlatCryptoBase;
|
|
if (clazz == null) {
|
|
clazz = class$com$tridium$platcrypto$daemon$BPlatCryptoBase = BPlatCryptoBase.class("[Lcom.tridium.platcrypto.daemon.BPlatCryptoBase;", false);
|
|
}
|
|
TYPE = Sys.loadType((Class)clazz);
|
|
}
|
|
}
|
|
|