Brian's Waste of Time

Tue, 28 Jun 2005

Smoking the ActiveMQ Crack...

James pointed me to his code generators for binary marshalling/unmarshalling of ActiveMQ's wire protocol a while back. I finally got a chance to start beating on them. Behold the awful transition state from C# to Ruby!

 
#
# Marshalling code for Open Wire Format for ActiveMQTextMessage
#
#
# NOTE!: This file is autogenerated - do not modify!
#        if you need to make a change, please see the Groovy scripts in the
#        activemq-openwire module
#

class ActiveMQTextMessage < AbstractPacketMarshaller

  def packet_type() 
    return 35;
  end

  #public override Packet CreatePacket() {
  def create_packet()
    return ActiveMQTextMessage.new;
  end

  #public override void BuildPacket(Packet packet, DataInput dataIn)
  def build_packet(packet, data_in)
    super.build_packet(packet, data_in)

  end

  #public override void WritePacket(Packet packet, DataOutput dataOut) throws
  def write_packet(packet, data_out)
    super.writePacket(packet, data_out);

    end
  end
end

Hopefully it will finish up smoother than it has started, but I am starting to get the hang of it ;-)

0 writebacks [/src/ruby] permanent link