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

239 lines
7.7 KiB
Java

/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* javax.baja.data.BIDataValue
* javax.baja.sys.BBoolean
* javax.baja.sys.BComplex
* javax.baja.sys.BComponent
* javax.baja.sys.BComponentEvent
* javax.baja.sys.BFacets
* javax.baja.sys.BValue
* javax.baja.sys.BVector
* javax.baja.sys.Property
* javax.baja.sys.Subscriber
* javax.baja.sys.Sys
* javax.baja.sys.Type
*/
package com.tridium.platform.tcpip;
import com.tridium.platform.BPlatformService;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import javax.baja.data.BIDataValue;
import javax.baja.sys.BBoolean;
import javax.baja.sys.BComplex;
import javax.baja.sys.BComponent;
import javax.baja.sys.BComponentEvent;
import javax.baja.sys.BFacets;
import javax.baja.sys.BValue;
import javax.baja.sys.BVector;
import javax.baja.sys.Property;
import javax.baja.sys.Subscriber;
import javax.baja.sys.Sys;
import javax.baja.sys.Type;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
public class BTcpIpHostSettings
extends BComponent {
public static final Property hostName = BTcpIpHostSettings.newProperty((int)3, (String)"", null);
public static final Property adapters = BTcpIpHostSettings.newProperty((int)3, (BValue)new BVector(), null);
public static final Property niagaraUsesIpv6 = BTcpIpHostSettings.newProperty((int)3, (boolean)false, null);
public static final Property hostFileContents = BTcpIpHostSettings.newProperty((int)3, (String)"", (BFacets)BFacets.make((String)"multiLine", (BIDataValue)BBoolean.TRUE));
public static final Property usesAdapterLevelSettings = BTcpIpHostSettings.newProperty((int)3, (boolean)true, null);
public static final Property isIPv6Readonly = BTcpIpHostSettings.newProperty((int)3, (boolean)true, null);
public static final Property isReadonly = BTcpIpHostSettings.newProperty((int)3, (boolean)false, null);
public static final Property defaultGateway = BTcpIpHostSettings.newProperty((int)3, (String)"", null);
public static final Property dnsHosts = BTcpIpHostSettings.newProperty((int)3, (BValue)new BVector(), null);
public static final Property maxDnsHosts = BTcpIpHostSettings.newProperty((int)6, (int)2, null);
public static final Property domain = BTcpIpHostSettings.newProperty((int)3, (String)"", null);
public static final Property ipv6DefaultGateway = BTcpIpHostSettings.newProperty((int)3, (String)"", null);
public static final Property ipv6DefaultDevice = BTcpIpHostSettings.newProperty((int)3, (String)"", null);
public static final Property ipv6DnsHosts = BTcpIpHostSettings.newProperty((int)3, (BValue)new BVector(), null);
public static final Type TYPE;
private Subscriber subscriber;
static /* synthetic */ Class class$com$tridium$platform$tcpip$BTcpIpHostSettings;
public String getHostName() {
return this.getString(hostName);
}
public void setHostName(String string) {
this.setString(hostName, string, null);
}
public BVector getAdapters() {
return (BVector)this.get(adapters);
}
public void setAdapters(BVector bVector) {
this.set(adapters, (BValue)bVector, null);
}
public boolean getNiagaraUsesIpv6() {
return this.getBoolean(niagaraUsesIpv6);
}
public void setNiagaraUsesIpv6(boolean bl) {
this.setBoolean(niagaraUsesIpv6, bl, null);
}
public String getHostFileContents() {
return this.getString(hostFileContents);
}
public void setHostFileContents(String string) {
this.setString(hostFileContents, string, null);
}
public boolean getUsesAdapterLevelSettings() {
return this.getBoolean(usesAdapterLevelSettings);
}
public void setUsesAdapterLevelSettings(boolean bl) {
this.setBoolean(usesAdapterLevelSettings, bl, null);
}
public boolean getIsIPv6Readonly() {
return this.getBoolean(isIPv6Readonly);
}
public void setIsIPv6Readonly(boolean bl) {
this.setBoolean(isIPv6Readonly, bl, null);
}
public boolean getIsReadonly() {
return this.getBoolean(isReadonly);
}
public void setIsReadonly(boolean bl) {
this.setBoolean(isReadonly, bl, null);
}
public String getDefaultGateway() {
return this.getString(defaultGateway);
}
public void setDefaultGateway(String string) {
this.setString(defaultGateway, string, null);
}
public BVector getDnsHosts() {
return (BVector)this.get(dnsHosts);
}
public void setDnsHosts(BVector bVector) {
this.set(dnsHosts, (BValue)bVector, null);
}
public int getMaxDnsHosts() {
return this.getInt(maxDnsHosts);
}
public void setMaxDnsHosts(int n) {
this.setInt(maxDnsHosts, n, null);
}
public String getDomain() {
return this.getString(domain);
}
public void setDomain(String string) {
this.setString(domain, string, null);
}
public String getIpv6DefaultGateway() {
return this.getString(ipv6DefaultGateway);
}
public void setIpv6DefaultGateway(String string) {
this.setString(ipv6DefaultGateway, string, null);
}
public String getIpv6DefaultDevice() {
return this.getString(ipv6DefaultDevice);
}
public void setIpv6DefaultDevice(String string) {
this.setString(ipv6DefaultDevice, string, null);
}
public BVector getIpv6DnsHosts() {
return (BVector)this.get(ipv6DnsHosts);
}
public void setIpv6DnsHosts(BVector bVector) {
this.set(ipv6DnsHosts, (BValue)bVector, null);
}
public Type getType() {
return TYPE;
}
public void started() throws Exception {
this.setNiagaraUsesIpv6(Boolean.getBoolean("niagara.ipv6Enabled"));
}
public void loadHostFileContents(InputStream inputStream) throws IOException {
int n;
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
byte[] byArray = new byte[8192];
while ((n = inputStream.read(byArray, 0, 8192)) > 0) {
byteArrayOutputStream.write(byArray, 0, n);
}
this.setHostFileContents(byteArrayOutputStream.toString());
inputStream.close();
}
public void subscribed() {
BComplex bComplex = this.getParent();
if (bComplex != null && bComplex instanceof BPlatformService) {
this.subscriber.subscribe((BComponent)((BPlatformService)bComplex));
}
}
public void unsubscribed() {
BComplex bComplex = this.getParent();
if (bComplex != null && bComplex instanceof BPlatformService) {
this.subscriber.unsubscribe((BComponent)((BPlatformService)bComplex));
}
}
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());
}
}
private final /* synthetic */ void this() {
this.subscriber = new Subscriber(){
public final void event(BComponentEvent bComponentEvent) {
}
};
}
public BTcpIpHostSettings() {
this.this();
}
static {
Class clazz = class$com$tridium$platform$tcpip$BTcpIpHostSettings;
if (clazz == null) {
clazz = class$com$tridium$platform$tcpip$BTcpIpHostSettings = BTcpIpHostSettings.class("[Lcom.tridium.platform.tcpip.BTcpIpHostSettings;", false);
}
TYPE = Sys.loadType((Class)clazz);
}
}