/* * Decompiled with CFR 0.152. * * Could not load the following classes: * com.tridium.space.BGateway * com.tridium.sys.schema.ComponentSlotMap * javax.baja.agent.AgentFilter * javax.baja.agent.AgentList * javax.baja.naming.BOrd * javax.baja.space.BSpace * javax.baja.sys.BComponent * javax.baja.sys.Sys * javax.baja.sys.Type * javax.baja.util.LexiconText * javax.baja.virtual.BVirtualGateway */ package com.tridium.fox.sys.broker; import com.tridium.fox.sys.BIFoxGatewayProxyFactory; import com.tridium.fox.sys.BIFoxProxySpace; import com.tridium.fox.sys.broker.BFoxComponentSpace; import com.tridium.fox.sys.broker.BFoxVirtualSpace; import com.tridium.space.BGateway; import com.tridium.sys.schema.ComponentSlotMap; import javax.baja.agent.AgentFilter; import javax.baja.agent.AgentList; import javax.baja.naming.BOrd; import javax.baja.space.BSpace; import javax.baja.sys.BComponent; import javax.baja.sys.Sys; import javax.baja.sys.Type; import javax.baja.util.LexiconText; import javax.baja.virtual.BVirtualGateway; /* * Illegal identifiers - consider using --renameillegalidents true */ public class BFoxStationSpace extends BFoxComponentSpace { public static final Type TYPE; static /* synthetic */ Class class$com$tridium$fox$sys$broker$BFoxStationSpace; public Type getType() { return TYPE; } public Type[] getEnabledMixIns() { return this.channel.getConnection().getChannels().getSysChannel().getStationMixIns(); } public Object fw(int n, Object object, Object object2, Object object3, Object object4) { if (n == 101) { super.fw(n, object, object2, object3, object4); this.fwMount((ComponentSlotMap)object); return null; } return super.fw(n, object, object2, object3, object4); } private final void fwMount(ComponentSlotMap componentSlotMap) { BComponent bComponent = (BComponent)componentSlotMap.getInstance(); if (bComponent instanceof BVirtualGateway) { BVirtualGateway bVirtualGateway = (BVirtualGateway)bComponent; bVirtualGateway.fw(108, (Object)new BFoxVirtualSpace(bVirtualGateway), null, null, null); } else if (bComponent instanceof BGateway) { BSpace bSpace = null; BGateway bGateway = (BGateway)bComponent; AgentList agentList = bGateway.getAgents(); if ((agentList = agentList.filter(AgentFilter.is((Type)BIFoxGatewayProxyFactory.TYPE))).size() != 0) { bSpace = ((BIFoxGatewayProxyFactory)agentList.getDefault().getInstance()).makeFoxGatewayProxySpace(bGateway); if (!(bSpace instanceof BIFoxProxySpace)) { throw new IllegalStateException("Fox gateway proxy space must implement BIFoxProxySpace"); } bGateway.fw(108, (Object)bSpace, null, null, null); } else { throw new IllegalStateException("Could not find BIFoxGatewayProxyFactory for " + bComponent.getType()); } } } 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 BFoxStationSpace() { super("station", LexiconText.make((String)"baja", (String)"nav.station"), BOrd.make((String)"station:")); } static { Class clazz = class$com$tridium$fox$sys$broker$BFoxStationSpace; if (clazz == null) { clazz = class$com$tridium$fox$sys$broker$BFoxStationSpace = BFoxStationSpace.class("[Lcom.tridium.fox.sys.broker.BFoxStationSpace;", false); } TYPE = Sys.loadType((Class)clazz); } }