Source code: org/activemq/transport/openwire/io/CachedValueMarshaller.java
1 /**
2 * Marshalling code for Open Wire Format for CachedValue
3 *
4 *
5 * NOTE!: This file is autogenerated - do not modify!
6 * if you need to make a change, please see the Groovy scripts in the
7 * activemq-openwire module
8 */
9
10 package org.activemq.transport.openwire.io;
11
12 import java.io.DataInput;
13 import java.io.DataOutput;
14 import java.io.IOException;
15
16 import org.activemq.message.*;
17 import org.activemq.io.*;
18 import org.activemq.io.impl.*;
19 import org.activemq.transport.openwire.OpenWirePacketMarshallerSupport;
20
21 /**
22 * AUTOGENERATED Marshaller for OpenWire command CachedValue
23 *
24 * @version $Revision: 1.1 $
25 */
26 public class CachedValueMarshaller extends OpenWirePacketMarshallerSupport {
27
28 /**
29 * Return the type of Packet
30 *
31 * @return integer representation of the type of Packet
32 */
33 public int getPacketType() {
34 return 3;
35 }
36
37 /**
38 * @return a new Packet instance
39 */
40 public Packet createPacket() {
41 return new CachedValue();
42 }
43
44 /**
45 * build a Packet instance from the data input stream
46 *
47 * @param packet A Packet object
48 * @param dataIn the data input stream to build the packet from
49 * @throws IOException
50 */
51 public void buildPacket(Packet packet, DataInput dataIn) throws IOException {
52 super.buildPacket(packet, dataIn);
53 CachedValue info = (CachedValue) packet;
54 info.readBody(dataIn);
55
56 }
57
58 /**
59 * Write a Packet instance to data output stream
60 *
61 * @param packet the instance to be seralized
62 * @param dataOut the output stream
63 * @throws IOException thrown if an error occurs
64 */
65 public void writePacket(Packet packet, DataOutput dataOut) throws IOException {
66 super.writePacket(packet, dataOut);
67 CachedValue info = (CachedValue) packet;
68 info.writeBody(dataOut);
69
70 }
71 }