/** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); BrokerInfo info = (BrokerInfo)o; info.setBrokerId((org.apache.activemq.command.BrokerId)looseUnmarsalCachedObject(wireFormat, dataIn)); info.setBrokerURL(looseUnmarshalString(dataIn)); if (dataIn.readBoolean()) { short size = dataIn.readShort(); org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size]; for (int i = 0; i < size; i++) { value[i] = (org.apache.activemq.command.BrokerInfo)looseUnmarsalNestedObject(wireFormat, dataIn); } info.setPeerBrokerInfos(value); } else { info.setPeerBrokerInfos(null); } info.setBrokerName(looseUnmarshalString(dataIn)); info.setSlaveBroker(dataIn.readBoolean()); info.setMasterBroker(dataIn.readBoolean()); info.setFaultTolerantConfiguration(dataIn.readBoolean()); }
protected void startBridge() throws Exception { connectionInfo = new ConnectionInfo(); connectionInfo.setConnectionId(new ConnectionId(idGenerator.generateId())); connectionInfo.setClientId(idGenerator.generateId()); connectionInfo.setUserName(userName); connectionInfo.setPassword(password); connectionInfo.setBrokerMasterConnector(true); sessionInfo = new SessionInfo(connectionInfo, 1); producerInfo = new ProducerInfo(sessionInfo, 1); producerInfo.setResponseRequired(false); if (connector != null) { brokerInfo = connector.getBrokerInfo(); } else { brokerInfo = new BrokerInfo(); } brokerInfo.setBrokerName(broker.getBrokerName()); brokerInfo.setPeerBrokerInfos(broker.getBroker().getPeerBrokerInfos()); brokerInfo.setSlaveBroker(true); brokerInfo.setPassiveSlave(broker.isPassiveSlave()); restartBridge(); LOG.info("Slave connection between " + localBroker + " and " + remoteBroker + " has been established."); }
info.setBrokerId((org.apache.activemq.command.BrokerId)looseUnmarsalCachedObject(wireFormat, dataIn)); info.setBrokerURL(looseUnmarshalString(dataIn)); dataIn); info.setPeerBrokerInfos(value); } else { info.setPeerBrokerInfos(null); info.setBrokerName(looseUnmarshalString(dataIn)); info.setSlaveBroker(dataIn.readBoolean()); info.setMasterBroker(dataIn.readBoolean()); info.setFaultTolerantConfiguration(dataIn.readBoolean()); info.setDuplexConnection(dataIn.readBoolean()); info.setNetworkConnection(dataIn.readBoolean());
/** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); BrokerInfo info = (BrokerInfo)o; info.setBrokerId((org.apache.activemq.command.BrokerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setBrokerURL(tightUnmarshalString(dataIn, bs)); if (bs.readBoolean()) { short size = dataIn.readShort(); org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size]; for (int i = 0; i < size; i++) { value[i] = (org.apache.activemq.command.BrokerInfo)tightUnmarsalNestedObject(wireFormat, dataIn, bs); } info.setPeerBrokerInfos(value); } else { info.setPeerBrokerInfos(null); } info.setBrokerName(tightUnmarshalString(dataIn, bs)); info.setSlaveBroker(bs.readBoolean()); info.setMasterBroker(bs.readBoolean()); info.setFaultTolerantConfiguration(bs.readBoolean()); }
info.setBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setBrokerURL(looseUnmarshalString(dataIn)); value[i] = (org.apache.activemq.command.BrokerInfo) looseUnmarsalNestedObject(wireFormat,dataIn); info.setPeerBrokerInfos(value); info.setPeerBrokerInfos(null); info.setBrokerName(looseUnmarshalString(dataIn)); info.setSlaveBroker(dataIn.readBoolean()); info.setMasterBroker(dataIn.readBoolean()); info.setFaultTolerantConfiguration(dataIn.readBoolean()); info.setDuplexConnection(dataIn.readBoolean()); info.setNetworkConnection(dataIn.readBoolean());
info.setBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setBrokerURL(looseUnmarshalString(dataIn)); value[i] = (org.apache.activemq.command.BrokerInfo) looseUnmarsalNestedObject(wireFormat,dataIn); info.setPeerBrokerInfos(value); info.setPeerBrokerInfos(null); info.setBrokerName(looseUnmarshalString(dataIn)); info.setSlaveBroker(dataIn.readBoolean()); info.setMasterBroker(dataIn.readBoolean()); info.setFaultTolerantConfiguration(dataIn.readBoolean()); info.setDuplexConnection(dataIn.readBoolean()); info.setNetworkConnection(dataIn.readBoolean());
info.setBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setBrokerURL(looseUnmarshalString(dataIn)); value[i] = (org.apache.activemq.command.BrokerInfo) looseUnmarsalNestedObject(wireFormat,dataIn); info.setPeerBrokerInfos(value); info.setPeerBrokerInfos(null); info.setBrokerName(looseUnmarshalString(dataIn)); info.setSlaveBroker(dataIn.readBoolean()); info.setMasterBroker(dataIn.readBoolean()); info.setFaultTolerantConfiguration(dataIn.readBoolean()); info.setDuplexConnection(dataIn.readBoolean()); info.setNetworkConnection(dataIn.readBoolean());
info.setBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setBrokerURL(looseUnmarshalString(dataIn)); value[i] = (org.apache.activemq.command.BrokerInfo) looseUnmarsalNestedObject(wireFormat,dataIn); info.setPeerBrokerInfos(value); info.setPeerBrokerInfos(null); info.setBrokerName(looseUnmarshalString(dataIn)); info.setSlaveBroker(dataIn.readBoolean()); info.setMasterBroker(dataIn.readBoolean()); info.setFaultTolerantConfiguration(dataIn.readBoolean()); info.setDuplexConnection(dataIn.readBoolean()); info.setNetworkConnection(dataIn.readBoolean());
info.setBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setBrokerURL(looseUnmarshalString(dataIn)); value[i] = (org.apache.activemq.command.BrokerInfo) looseUnmarsalNestedObject(wireFormat,dataIn); info.setPeerBrokerInfos(value); info.setPeerBrokerInfos(null); info.setBrokerName(looseUnmarshalString(dataIn)); info.setSlaveBroker(dataIn.readBoolean()); info.setMasterBroker(dataIn.readBoolean()); info.setFaultTolerantConfiguration(dataIn.readBoolean()); info.setDuplexConnection(dataIn.readBoolean()); info.setNetworkConnection(dataIn.readBoolean());
info.setBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setBrokerURL(looseUnmarshalString(dataIn)); value[i] = (org.apache.activemq.command.BrokerInfo) looseUnmarsalNestedObject(wireFormat,dataIn); info.setPeerBrokerInfos(value); info.setPeerBrokerInfos(null); info.setBrokerName(looseUnmarshalString(dataIn)); info.setSlaveBroker(dataIn.readBoolean()); info.setMasterBroker(dataIn.readBoolean()); info.setFaultTolerantConfiguration(dataIn.readBoolean()); info.setDuplexConnection(dataIn.readBoolean()); info.setNetworkConnection(dataIn.readBoolean());
info.setBrokerId((org.apache.activemq.command.BrokerId)looseUnmarsalCachedObject(wireFormat, dataIn)); info.setBrokerURL(looseUnmarshalString(dataIn)); dataIn); info.setPeerBrokerInfos(value); } else { info.setPeerBrokerInfos(null); info.setBrokerName(looseUnmarshalString(dataIn)); info.setSlaveBroker(dataIn.readBoolean()); info.setMasterBroker(dataIn.readBoolean()); info.setFaultTolerantConfiguration(dataIn.readBoolean()); info.setDuplexConnection(dataIn.readBoolean()); info.setNetworkConnection(dataIn.readBoolean());
info.setBrokerId((org.apache.activemq.command.BrokerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setBrokerURL(tightUnmarshalString(dataIn, bs)); dataIn, bs); info.setPeerBrokerInfos(value); } else { info.setPeerBrokerInfos(null); info.setBrokerName(tightUnmarshalString(dataIn, bs)); info.setSlaveBroker(bs.readBoolean()); info.setMasterBroker(bs.readBoolean()); info.setFaultTolerantConfiguration(bs.readBoolean()); info.setDuplexConnection(bs.readBoolean()); info.setNetworkConnection(bs.readBoolean());
info.setBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setBrokerURL(tightUnmarshalString(dataIn, bs)); value[i] = (org.apache.activemq.command.BrokerInfo) tightUnmarsalNestedObject(wireFormat,dataIn, bs); info.setPeerBrokerInfos(value); info.setPeerBrokerInfos(null); info.setBrokerName(tightUnmarshalString(dataIn, bs)); info.setSlaveBroker(bs.readBoolean()); info.setMasterBroker(bs.readBoolean()); info.setFaultTolerantConfiguration(bs.readBoolean()); info.setDuplexConnection(bs.readBoolean()); info.setNetworkConnection(bs.readBoolean());
info.setBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setBrokerURL(tightUnmarshalString(dataIn, bs)); value[i] = (org.apache.activemq.command.BrokerInfo) tightUnmarsalNestedObject(wireFormat,dataIn, bs); info.setPeerBrokerInfos(value); info.setPeerBrokerInfos(null); info.setBrokerName(tightUnmarshalString(dataIn, bs)); info.setSlaveBroker(bs.readBoolean()); info.setMasterBroker(bs.readBoolean()); info.setFaultTolerantConfiguration(bs.readBoolean()); info.setDuplexConnection(bs.readBoolean()); info.setNetworkConnection(bs.readBoolean());
info.setBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setBrokerURL(tightUnmarshalString(dataIn, bs)); value[i] = (org.apache.activemq.command.BrokerInfo) tightUnmarsalNestedObject(wireFormat,dataIn, bs); info.setPeerBrokerInfos(value); info.setPeerBrokerInfos(null); info.setBrokerName(tightUnmarshalString(dataIn, bs)); info.setSlaveBroker(bs.readBoolean()); info.setMasterBroker(bs.readBoolean()); info.setFaultTolerantConfiguration(bs.readBoolean()); info.setDuplexConnection(bs.readBoolean()); info.setNetworkConnection(bs.readBoolean());
info.setBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setBrokerURL(tightUnmarshalString(dataIn, bs)); value[i] = (org.apache.activemq.command.BrokerInfo) tightUnmarsalNestedObject(wireFormat,dataIn, bs); info.setPeerBrokerInfos(value); info.setPeerBrokerInfos(null); info.setBrokerName(tightUnmarshalString(dataIn, bs)); info.setSlaveBroker(bs.readBoolean()); info.setMasterBroker(bs.readBoolean()); info.setFaultTolerantConfiguration(bs.readBoolean()); info.setDuplexConnection(bs.readBoolean()); info.setNetworkConnection(bs.readBoolean());
info.setBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setBrokerURL(tightUnmarshalString(dataIn, bs)); value[i] = (org.apache.activemq.command.BrokerInfo) tightUnmarsalNestedObject(wireFormat,dataIn, bs); info.setPeerBrokerInfos(value); info.setPeerBrokerInfos(null); info.setBrokerName(tightUnmarshalString(dataIn, bs)); info.setSlaveBroker(bs.readBoolean()); info.setMasterBroker(bs.readBoolean()); info.setFaultTolerantConfiguration(bs.readBoolean()); info.setDuplexConnection(bs.readBoolean()); info.setNetworkConnection(bs.readBoolean());
info.setBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setBrokerURL(tightUnmarshalString(dataIn, bs)); value[i] = (org.apache.activemq.command.BrokerInfo) tightUnmarsalNestedObject(wireFormat,dataIn, bs); info.setPeerBrokerInfos(value); info.setPeerBrokerInfos(null); info.setBrokerName(tightUnmarshalString(dataIn, bs)); info.setSlaveBroker(bs.readBoolean()); info.setMasterBroker(bs.readBoolean()); info.setFaultTolerantConfiguration(bs.readBoolean()); info.setDuplexConnection(bs.readBoolean()); info.setNetworkConnection(bs.readBoolean());
info.setBrokerId((org.apache.activemq.command.BrokerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setBrokerURL(tightUnmarshalString(dataIn, bs)); dataIn, bs); info.setPeerBrokerInfos(value); } else { info.setPeerBrokerInfos(null); info.setBrokerName(tightUnmarshalString(dataIn, bs)); info.setSlaveBroker(bs.readBoolean()); info.setMasterBroker(bs.readBoolean()); info.setFaultTolerantConfiguration(bs.readBoolean()); info.setDuplexConnection(bs.readBoolean()); info.setNetworkConnection(bs.readBoolean());
/** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); BrokerInfo info = (BrokerInfo)o; info.setBrokerId((org.apache.activemq.command.BrokerId)looseUnmarsalCachedObject(wireFormat, dataIn)); info.setBrokerURL(looseUnmarshalString(dataIn)); if (dataIn.readBoolean()) { short size = dataIn.readShort(); org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size]; for (int i = 0; i < size; i++) { value[i] = (org.apache.activemq.command.BrokerInfo)looseUnmarsalNestedObject(wireFormat, dataIn); } info.setPeerBrokerInfos(value); } else { info.setPeerBrokerInfos(null); } info.setBrokerName(looseUnmarshalString(dataIn)); info.setSlaveBroker(dataIn.readBoolean()); info.setMasterBroker(dataIn.readBoolean()); info.setFaultTolerantConfiguration(dataIn.readBoolean()); }