private void InitializeObjectSerializer(AMQPObjectEncodingType type) { switch (type) { case AMQPObjectEncodingType.AMQP_TYPE: objectSerializer = new AMQPTypeSerializer(this); break; case AMQPObjectEncodingType.DOTNET_SERIALIZABLE: objectSerializer = new DotnetObjectSerializer(this); break; case AMQPObjectEncodingType.JAVA_SERIALIZABLE: objectSerializer = new JavaObjectSerializer(this); break; default: throw NMSExceptionSupport.Create(new ArgumentException("Unsupported object encoding.")); } }
private void InitEncodingType() { encodingType = ConnectionEncodingType(Parent); Tracer.InfoFormat("Message Serialization for connection : {0}, is set to: {1}.", Parent.ClientId, encodingType.ToString()); }
internal AMQPObjectMessageCloak(NMS.AMQP.Connection c, AMQPObjectEncodingType type) : base(c) { InitializeObjectSerializer(type); Body = null; }