// // Write the booleans that this object uses to a BooleanStream // public override int TightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { int rc = base.TightMarshal1(wireFormat, o, bs); return rc + 0; }
// // Write a object instance to data output stream // public override void TightMarshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { base.TightMarshal2(wireFormat, o, dataOut, bs); SessionInfo info = (SessionInfo)o; TightMarshalCachedObject2(wireFormat, (DataStructure)info.SessionId, dataOut, bs); }
// // Un-marshal an object instance from the data input stream // public override void LooseUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn) { base.LooseUnmarshal(wireFormat, o, dataIn); BrokerInfo info = (BrokerInfo)o; info.BrokerId = (BrokerId) LooseUnmarshalCachedObject(wireFormat, dataIn); info.BrokerURL = LooseUnmarshalString(dataIn); if (dataIn.ReadBoolean()) { short size = dataIn.ReadInt16(); BrokerInfo[] value = new BrokerInfo[size]; for( int i=0; i < size; i++ ) { value[i] = (BrokerInfo) LooseUnmarshalNestedObject(wireFormat,dataIn); } info.PeerBrokerInfos = value; } else { info.PeerBrokerInfos = null; } info.BrokerName = LooseUnmarshalString(dataIn); info.SlaveBroker = dataIn.ReadBoolean(); info.MasterBroker = dataIn.ReadBoolean(); info.FaultTolerantConfiguration = dataIn.ReadBoolean(); info.DuplexConnection = dataIn.ReadBoolean(); info.NetworkConnection = dataIn.ReadBoolean(); info.ConnectionId = LooseUnmarshalLong(wireFormat, dataIn); }
// // Un-marshal an object instance from the data input stream // public override void LooseUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn) { base.LooseUnmarshal(wireFormat, o, dataIn); RemoveInfo info = (RemoveInfo)o; info.ObjectId = (DataStructure) LooseUnmarshalCachedObject(wireFormat, dataIn); }
// // Un-marshal an object instance from the data input stream // public override void TightUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) { base.TightUnmarshal(wireFormat, o, dataIn, bs); BrokerInfo info = (BrokerInfo)o; info.BrokerId = (BrokerId) TightUnmarshalCachedObject(wireFormat, dataIn, bs); info.BrokerURL = TightUnmarshalString(dataIn, bs); if (bs.ReadBoolean()) { short size = dataIn.ReadInt16(); BrokerInfo[] value = new BrokerInfo[size]; for( int i=0; i < size; i++ ) { value[i] = (BrokerInfo) TightUnmarshalNestedObject(wireFormat,dataIn, bs); } info.PeerBrokerInfos = value; } else { info.PeerBrokerInfos = null; } info.BrokerName = TightUnmarshalString(dataIn, bs); info.SlaveBroker = bs.ReadBoolean(); info.MasterBroker = bs.ReadBoolean(); info.FaultTolerantConfiguration = bs.ReadBoolean(); info.DuplexConnection = bs.ReadBoolean(); info.NetworkConnection = bs.ReadBoolean(); info.ConnectionId = TightUnmarshalLong(wireFormat, dataIn, bs); info.BrokerUploadUrl = TightUnmarshalString(dataIn, bs); info.NetworkProperties = TightUnmarshalString(dataIn, bs); }
// // Write a object instance to data output stream // public override void TightMarshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { base.TightMarshal2(wireFormat, o, dataOut, bs); JournalTrace info = (JournalTrace)o; TightMarshalString2(info.Message, dataOut, bs); }
/// <summery> /// Adds the Marshallers for this version of the OpenWire protocol to the /// Collection of Marshallers stored in the OpenWireFormat class. /// </summery> public void configure(OpenWireFormat format) { format.clearMarshallers(); format.addMarshaller(new ActiveMQBlobMessageMarshaller()); format.addMarshaller(new ActiveMQBytesMessageMarshaller()); format.addMarshaller(new ActiveMQMapMessageMarshaller()); format.addMarshaller(new ActiveMQMessageMarshaller()); format.addMarshaller(new ActiveMQObjectMessageMarshaller()); format.addMarshaller(new ActiveMQQueueMarshaller()); format.addMarshaller(new ActiveMQStreamMessageMarshaller()); format.addMarshaller(new ActiveMQTempQueueMarshaller()); format.addMarshaller(new ActiveMQTempTopicMarshaller()); format.addMarshaller(new ActiveMQTextMessageMarshaller()); format.addMarshaller(new ActiveMQTopicMarshaller()); format.addMarshaller(new BrokerIdMarshaller()); format.addMarshaller(new BrokerInfoMarshaller()); format.addMarshaller(new ConnectionControlMarshaller()); format.addMarshaller(new ConnectionErrorMarshaller()); format.addMarshaller(new ConnectionIdMarshaller()); format.addMarshaller(new ConnectionInfoMarshaller()); format.addMarshaller(new ConsumerControlMarshaller()); format.addMarshaller(new ConsumerIdMarshaller()); format.addMarshaller(new ConsumerInfoMarshaller()); format.addMarshaller(new ControlCommandMarshaller()); format.addMarshaller(new DataArrayResponseMarshaller()); format.addMarshaller(new DataResponseMarshaller()); format.addMarshaller(new DestinationInfoMarshaller()); format.addMarshaller(new DiscoveryEventMarshaller()); format.addMarshaller(new ExceptionResponseMarshaller()); format.addMarshaller(new FlushCommandMarshaller()); format.addMarshaller(new IntegerResponseMarshaller()); format.addMarshaller(new JournalQueueAckMarshaller()); format.addMarshaller(new JournalTopicAckMarshaller()); format.addMarshaller(new JournalTraceMarshaller()); format.addMarshaller(new JournalTransactionMarshaller()); format.addMarshaller(new KeepAliveInfoMarshaller()); format.addMarshaller(new LastPartialCommandMarshaller()); format.addMarshaller(new LocalTransactionIdMarshaller()); format.addMarshaller(new MessageAckMarshaller()); format.addMarshaller(new MessageDispatchMarshaller()); format.addMarshaller(new MessageDispatchNotificationMarshaller()); format.addMarshaller(new MessageIdMarshaller()); format.addMarshaller(new MessagePullMarshaller()); format.addMarshaller(new NetworkBridgeFilterMarshaller()); format.addMarshaller(new PartialCommandMarshaller()); format.addMarshaller(new ProducerAckMarshaller()); format.addMarshaller(new ProducerIdMarshaller()); format.addMarshaller(new ProducerInfoMarshaller()); format.addMarshaller(new RemoveInfoMarshaller()); format.addMarshaller(new RemoveSubscriptionInfoMarshaller()); format.addMarshaller(new ReplayCommandMarshaller()); format.addMarshaller(new ResponseMarshaller()); format.addMarshaller(new SessionIdMarshaller()); format.addMarshaller(new SessionInfoMarshaller()); format.addMarshaller(new ShutdownInfoMarshaller()); format.addMarshaller(new SubscriptionInfoMarshaller()); format.addMarshaller(new TransactionInfoMarshaller()); format.addMarshaller(new WireFormatInfoMarshaller()); format.addMarshaller(new XATransactionIdMarshaller()); }
// // Write a object instance to data output stream // public override void TightMarshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { base.TightMarshal2(wireFormat, o, dataOut, bs); BrokerId info = (BrokerId)o; TightMarshalString2(info.Value, dataOut, bs); }
// // Un-marshal an object instance from the data input stream // public override void TightUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) { base.TightUnmarshal(wireFormat, o, dataIn, bs); JournalTrace info = (JournalTrace)o; info.Message = TightUnmarshalString(dataIn, bs); }
// // Write a object instance to data output stream // public override void TightMarshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { base.TightMarshal2(wireFormat, o, dataOut, bs); ActiveMQDestination info = (ActiveMQDestination)o; TightMarshalString2(info.PhysicalName, dataOut, bs); }
// // Write a object instance to data output stream // public override void TightMarshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { base.TightMarshal2(wireFormat, o, dataOut, bs); ExceptionResponse info = (ExceptionResponse)o; TightMarshalBrokerError2(wireFormat, info.Exception, dataOut, bs); }
// // Write a object instance to data output stream // public override void LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) { ExceptionResponse info = (ExceptionResponse)o; base.LooseMarshal(wireFormat, o, dataOut); LooseMarshalBrokerError(wireFormat, info.Exception, dataOut); }
// // Write a object instance to data output stream // public override void LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) { IntegerResponse info = (IntegerResponse)o; base.LooseMarshal(wireFormat, o, dataOut); dataOut.Write(info.Result); }
// // Un-marshal an object instance from the data input stream // public override void TightUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) { base.TightUnmarshal(wireFormat, o, dataIn, bs); ExceptionResponse info = (ExceptionResponse)o; info.Exception = TightUnmarshalBrokerError(wireFormat, dataIn, bs); }
// // Un-marshal an object instance from the data input stream // public override void LooseUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn) { base.LooseUnmarshal(wireFormat, o, dataIn); SessionInfo info = (SessionInfo)o; info.SessionId = (SessionId) LooseUnmarshalCachedObject(wireFormat, dataIn); }
// // Un-marshal an object instance from the data input stream // public override void LooseUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn) { base.LooseUnmarshal(wireFormat, o, dataIn); ActiveMQDestination info = (ActiveMQDestination)o; info.PhysicalName = LooseUnmarshalString(dataIn); }
// // Un-marshal an object instance from the data input stream // public override void LooseUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn) { base.LooseUnmarshal(wireFormat, o, dataIn); DataResponse info = (DataResponse)o; info.Data = (DataStructure) LooseUnmarshalNestedObject(wireFormat, dataIn); }
// // Write a object instance to data output stream // public override void TightMarshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { base.TightMarshal2(wireFormat, o, dataOut, bs); Response info = (Response)o; dataOut.Write(info.CorrelationId); }
// // Un-marshal an object instance from the data input stream // public override void LooseUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn) { base.LooseUnmarshal(wireFormat, o, dataIn); BrokerId info = (BrokerId)o; info.Value = LooseUnmarshalString(dataIn); }
// // Write a object instance to data output stream // public override void LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) { DataResponse info = (DataResponse)o; base.LooseMarshal(wireFormat, o, dataOut); LooseMarshalNestedObject(wireFormat, (DataStructure)info.Data, dataOut); }
// // Write a object instance to data output stream // public override void LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) { BrokerId info = (BrokerId)o; base.LooseMarshal(wireFormat, o, dataOut); LooseMarshalString(info.Value, dataOut); }
// // Write a object instance to data output stream // public override void LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) { DataArrayResponse info = (DataArrayResponse)o; base.LooseMarshal(wireFormat, o, dataOut); LooseMarshalObjectArray(wireFormat, info.Data, dataOut); }
// // Un-marshal an object instance from the data input stream // public override void LooseUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn) { base.LooseUnmarshal(wireFormat, o, dataIn); IntegerResponse info = (IntegerResponse)o; info.Result = dataIn.ReadInt32(); }
// // Un-marshal an object instance from the data input stream // public override void LooseUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn) { base.LooseUnmarshal(wireFormat, o, dataIn); ExceptionResponse info = (ExceptionResponse)o; info.Exception = LooseUnmarshalBrokerError(wireFormat, dataIn); }
// // Un-marshal an object instance from the data input stream // public override void LooseUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn) { base.LooseUnmarshal(wireFormat, o, dataIn); ConnectionInfo info = (ConnectionInfo)o; info.ConnectionId = (ConnectionId) LooseUnmarshalCachedObject(wireFormat, dataIn); info.ClientId = LooseUnmarshalString(dataIn); info.Password = LooseUnmarshalString(dataIn); info.UserName = LooseUnmarshalString(dataIn); if (dataIn.ReadBoolean()) { short size = dataIn.ReadInt16(); BrokerId[] value = new BrokerId[size]; for( int i=0; i < size; i++ ) { value[i] = (BrokerId) LooseUnmarshalNestedObject(wireFormat,dataIn); } info.BrokerPath = value; } else { info.BrokerPath = null; } info.BrokerMasterConnector = dataIn.ReadBoolean(); info.Manageable = dataIn.ReadBoolean(); info.ClientMaster = dataIn.ReadBoolean(); }
// // Un-marshal an object instance from the data input stream // public override void TightUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) { base.TightUnmarshal(wireFormat, o, dataIn, bs); Response info = (Response)o; info.CorrelationId = dataIn.ReadInt32(); }
// // Un-marshal an object instance from the data input stream // public override void TightUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) { base.TightUnmarshal(wireFormat, o, dataIn, bs); SessionInfo info = (SessionInfo)o; info.SessionId = (SessionId) TightUnmarshalCachedObject(wireFormat, dataIn, bs); }
// // Write a object instance to data output stream // public override void LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) { SessionInfo info = (SessionInfo)o; base.LooseMarshal(wireFormat, o, dataOut); LooseMarshalCachedObject(wireFormat, (DataStructure)info.SessionId, dataOut); }
// // Un-marshal an object instance from the data input stream // public override void TightUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) { base.TightUnmarshal(wireFormat, o, dataIn, bs); BrokerId info = (BrokerId)o; info.Value = TightUnmarshalString(dataIn, bs); }
// // Write a object instance to data output stream // public override void LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) { ActiveMQDestination info = (ActiveMQDestination)o; base.LooseMarshal(wireFormat, o, dataOut); LooseMarshalString(info.PhysicalName, dataOut); }
// // Write a object instance to data output stream // public override void TightMarshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { base.TightMarshal2(wireFormat, o, dataOut, bs); }
// // Un-marshal an object instance from the data input stream // public override void TightUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) { base.TightUnmarshal(wireFormat, o, dataIn, bs); }
// // Un-marshal an object instance from the data input stream // public override void LooseUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn) { base.LooseUnmarshal(wireFormat, o, dataIn); }
public virtual byte[] GetMarshalledForm(OpenWireFormat wireFormat) { return(null); }
// // Write the booleans that this object uses to a BooleanStream // public override int TightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { int rc = base.TightMarshal1(wireFormat, o, bs); return(rc + 0); }
public virtual void AfterUnmarshall(OpenWireFormat wireFormat) { }
// // Write a object instance to data output stream // public override void LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) { base.LooseMarshal(wireFormat, o, dataOut); }
public void SetUp() { wireFormat = new OpenWireFormat(); testMarshaller = new TestDataStreamMarshaller(); }
public virtual void SetMarshalledForm(OpenWireFormat wireFormat, byte[] data) { }
public ITransport CompositeConnect(Uri location, SetTransport setTransport) { // Extract query parameters from broker Uri StringDictionary map = URISupport.ParseQuery(location.Query); // Set transport. properties on this (the factory) URISupport.SetProperties(this, map, "transport."); // See if there is a local address and port specified string localAddress = null; int localPort = -1; if (!String.IsNullOrEmpty(location.AbsolutePath) && !location.AbsolutePath.Equals("/")) { int index = location.AbsolutePath.IndexOf(':'); try { localPort = Int16.Parse(location.AbsolutePath.Substring(index + 1)); localAddress = location.AbsolutePath.Substring(1, index - 1); Tracer.DebugFormat("Binding Socket to {0} on port: {1}", localAddress, localPort); } catch { Tracer.Warn("Invalid Port value on URI for local bind option, ignoring."); } } Tracer.Debug("Opening socket to: " + location.Host + " on port: " + location.Port); Socket socket = DoConnect(location.Host, location.Port, localAddress, localPort); #if !NETCF socket.ReceiveBufferSize = ReceiveBufferSize; socket.SendBufferSize = SendBufferSize; socket.ReceiveTimeout = ReceiveTimeout; socket.SendTimeout = SendTimeout; #endif OpenWireFormat wireformat = new OpenWireFormat(); // Set wireformat. properties on the wireformat owned by the tcpTransport URISupport.SetProperties(wireformat.PreferredWireFormatInfo, map, "wireFormat."); ITransport transport = DoCreateTransport(location, socket, wireformat); wireformat.Transport = transport; if (UseLogging) { transport = new LoggingTransport(transport); } if (UseInactivityMonitor) { transport = new InactivityMonitor(transport); } transport = new WireFormatNegotiator(transport, wireformat); transport.RequestTimeout = this.requestTimeout; if (setTransport != null) { setTransport(transport, location); } return(transport); }
public virtual void BeforeUnmarshall(OpenWireFormat wireFormat) { }