2026-03-17 13:31:18 -07:00

243 lines
8.6 KiB
Java

/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.nre.util.Array
* javax.baja.sys.BStruct
* javax.baja.sys.Context
* javax.baja.sys.Property
* javax.baja.sys.Sys
* javax.baja.sys.Type
*/
package com.tridium.fox.sys;
import com.tridium.fox.message.FoxMessage;
import com.tridium.fox.session.MulticastUtil;
import javax.baja.nre.util.Array;
import javax.baja.sys.BStruct;
import javax.baja.sys.Context;
import javax.baja.sys.Property;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BLearnStation
extends BStruct {
public static final Property stationName = BLearnStation.newProperty((int)8, (String)"", null);
public static final Property scheme = BLearnStation.newProperty((int)8, (String)"fox", null);
public static final Property address = BLearnStation.newProperty((int)8, (String)"", null);
public static final Property hostName = BLearnStation.newProperty((int)0, (String)"", null);
public static final Property hostAddress = BLearnStation.newProperty((int)0, (String)"", null);
public static final Property foxPort = BLearnStation.newProperty((int)0, (int)0, null);
public static final Property version = BLearnStation.newProperty((int)8, (String)"", null);
public static final Property hostModel = BLearnStation.newProperty((int)8, (String)"", null);
public static final Property hostId = BLearnStation.newProperty((int)0, (String)"", null);
public static final Property vmName = BLearnStation.newProperty((int)0, (String)"", null);
public static final Property vmVersion = BLearnStation.newProperty((int)0, (String)"", null);
public static final Property osName = BLearnStation.newProperty((int)0, (String)"", null);
public static final Property osVersion = BLearnStation.newProperty((int)0, (String)"", null);
public static final Type TYPE;
private String key;
static /* synthetic */ Class class$com$tridium$fox$sys$BLearnStation;
public String getStationName() {
return this.getString(stationName);
}
public void setStationName(String string) {
this.setString(stationName, string, null);
}
public String getScheme() {
return this.getString(scheme);
}
public void setScheme(String string) {
this.setString(scheme, string, null);
}
public String getAddress() {
return this.getString(address);
}
public void setAddress(String string) {
this.setString(address, string, null);
}
public String getHostName() {
return this.getString(hostName);
}
public void setHostName(String string) {
this.setString(hostName, string, null);
}
public String getHostAddress() {
return this.getString(hostAddress);
}
public void setHostAddress(String string) {
this.setString(hostAddress, string, null);
}
public int getFoxPort() {
return this.getInt(foxPort);
}
public void setFoxPort(int n) {
this.setInt(foxPort, n, null);
}
public String getVersion() {
return this.getString(version);
}
public void setVersion(String string) {
this.setString(version, string, null);
}
public String getHostModel() {
return this.getString(hostModel);
}
public void setHostModel(String string) {
this.setString(hostModel, string, null);
}
public String getHostId() {
return this.getString(hostId);
}
public void setHostId(String string) {
this.setString(hostId, string, null);
}
public String getVmName() {
return this.getString(vmName);
}
public void setVmName(String string) {
this.setString(vmName, string, null);
}
public String getVmVersion() {
return this.getString(vmVersion);
}
public void setVmVersion(String string) {
this.setString(vmVersion, string, null);
}
public String getOsName() {
return this.getString(osName);
}
public void setOsName(String string) {
this.setString(osName, string, null);
}
public String getOsVersion() {
return this.getString(osVersion);
}
public void setOsVersion(String string) {
this.setString(osVersion, string, null);
}
public Type getType() {
return TYPE;
}
public static BLearnStation[] make(FoxMessage foxMessage) throws Exception {
BLearnStation bLearnStation;
Class clazz = class$com$tridium$fox$sys$BLearnStation;
if (clazz == null) {
clazz = class$com$tridium$fox$sys$BLearnStation = BLearnStation.class("[Lcom.tridium.fox.sys.BLearnStation;", false);
}
Array array = new Array(clazz);
BLearnStation bLearnStation2 = new BLearnStation();
bLearnStation2.setStationName(foxMessage.getString("station"));
if (MulticastUtil.isIpv6Message(foxMessage)) {
bLearnStation2.setHostName(foxMessage.getString("hostNameIPv6", foxMessage.getString("hostName", "unknown")));
bLearnStation2.setHostAddress(foxMessage.getString("hostAddressIPv6", foxMessage.getString("hostAddress", "unknown")));
} else {
bLearnStation2.setHostName(foxMessage.getString("hostName"));
bLearnStation2.setHostAddress(foxMessage.getString("hostAddress"));
}
bLearnStation2.setVersion(foxMessage.getString("version", "unknown"));
bLearnStation2.setHostModel(foxMessage.getString("hostModel", "unknown"));
bLearnStation2.setHostId(foxMessage.getString("hostId", "unknown"));
bLearnStation2.setVmName(foxMessage.getString("vmName", "unknown"));
bLearnStation2.setVmVersion(foxMessage.getString("vmVersion", "unknown"));
bLearnStation2.setOsName(foxMessage.getString("osName", "unknown"));
bLearnStation2.setOsVersion(foxMessage.getString("osVersion", "unknown"));
bLearnStation2.invariant(false);
if (foxMessage.getInt("foxPort", 0) != 0) {
bLearnStation = (BLearnStation)bLearnStation2.newCopy();
bLearnStation.setScheme("fox");
bLearnStation.setFoxPort(foxMessage.getInt("foxPort", 0));
bLearnStation.invariant(false);
array.add((Object)bLearnStation);
}
if (foxMessage.getInt("foxsPort", 0) != 0) {
bLearnStation = (BLearnStation)bLearnStation2.newCopy();
bLearnStation.setScheme("foxs");
bLearnStation.setFoxPort(foxMessage.getInt("foxsPort", 0));
bLearnStation.invariant(false);
array.add((Object)bLearnStation);
}
return (BLearnStation[])array.trim();
}
public String getKey() {
return this.key;
}
public void invariant(boolean bl) {
String string;
String string2 = string = bl ? this.getHostName() : this.getHostAddress();
if (string.indexOf(58) != -1) {
string = "[" + string + ']';
}
if (this.getScheme().equalsIgnoreCase("fox") && this.getFoxPort() != 1911) {
string = string + ':' + this.getFoxPort();
} else if (this.getScheme().equalsIgnoreCase("foxs") && this.getFoxPort() != 4911) {
string = string + ':' + this.getFoxPort();
}
this.setAddress(string);
this.key = this.getStationName() + ':' + this.getScheme() + '@' + this.getHostAddress() + ':' + this.getFoxPort();
}
public String toString(Context context) {
String string = this.getHostAddress();
if (string.indexOf(58) != -1) {
string = "[" + string + ']';
}
return this.getStationName() + ':' + this.getScheme() + " @ " + this.getHostName() + '/' + string + ':' + this.getFoxPort() + " [" + this.getVersion() + "; " + this.getHostId() + "; " + this.getHostModel() + "; " + this.getOsName() + ' ' + this.getOsVersion() + "; " + this.getVmName() + ' ' + this.getVmVersion() + ']';
}
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());
}
}
static {
Class clazz = class$com$tridium$fox$sys$BLearnStation;
if (clazz == null) {
clazz = class$com$tridium$fox$sys$BLearnStation = BLearnStation.class("[Lcom.tridium.fox.sys.BLearnStation;", false);
}
TYPE = Sys.loadType((Class)clazz);
}
}