KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > activemq > openwire > v1 > MarshallerFactory


1 /**
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one or more
4  * contributor license agreements. See the NOTICE file distributed with
5  * this work for additional information regarding copyright ownership.
6  * The ASF licenses this file to You under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with
8  * the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 package org.apache.activemq.openwire.v1;
20
21 import org.apache.activemq.openwire.DataStreamMarshaller;
22 import org.apache.activemq.openwire.OpenWireFormat;
23
24 /**
25  * MarshallerFactory for Open Wire Format.
26  *
27  *
28  * NOTE!: This file is auto generated - do not modify!
29  * if you need to make a change, please see the modify the groovy scripts in the
30  * under src/gram/script and then use maven openwire:generate to regenerate
31  * this file.
32  *
33  * @version $Revision$
34  */

35 public class MarshallerFactory {
36
37     /**
38      * Creates a Map of command type -> Marshallers
39      */

40     static final private DataStreamMarshaller marshaller[] = new DataStreamMarshaller[256];
41     static {
42
43         add(new LocalTransactionIdMarshaller());
44         add(new PartialCommandMarshaller());
45         add(new IntegerResponseMarshaller());
46         add(new ActiveMQQueueMarshaller());
47         add(new ActiveMQObjectMessageMarshaller());
48         add(new ConnectionIdMarshaller());
49         add(new ConnectionInfoMarshaller());
50         add(new ProducerInfoMarshaller());
51         add(new MessageDispatchNotificationMarshaller());
52         add(new SessionInfoMarshaller());
53         add(new TransactionInfoMarshaller());
54         add(new ActiveMQStreamMessageMarshaller());
55         add(new MessageAckMarshaller());
56         add(new ProducerIdMarshaller());
57         add(new MessageIdMarshaller());
58         add(new ActiveMQTempQueueMarshaller());
59         add(new RemoveSubscriptionInfoMarshaller());
60         add(new SessionIdMarshaller());
61         add(new DataArrayResponseMarshaller());
62         add(new JournalQueueAckMarshaller());
63         add(new ResponseMarshaller());
64         add(new ConnectionErrorMarshaller());
65         add(new ConsumerInfoMarshaller());
66         add(new XATransactionIdMarshaller());
67         add(new JournalTraceMarshaller());
68         add(new ConsumerIdMarshaller());
69         add(new ActiveMQTextMessageMarshaller());
70         add(new SubscriptionInfoMarshaller());
71         add(new JournalTransactionMarshaller());
72         add(new ControlCommandMarshaller());
73         add(new LastPartialCommandMarshaller());
74         add(new NetworkBridgeFilterMarshaller());
75         add(new ActiveMQBytesMessageMarshaller());
76         add(new WireFormatInfoMarshaller());
77         add(new ActiveMQTempTopicMarshaller());
78         add(new DiscoveryEventMarshaller());
79         add(new ReplayCommandMarshaller());
80         add(new ActiveMQTopicMarshaller());
81         add(new BrokerInfoMarshaller());
82         add(new DestinationInfoMarshaller());
83         add(new ShutdownInfoMarshaller());
84         add(new DataResponseMarshaller());
85         add(new ConnectionControlMarshaller());
86         add(new KeepAliveInfoMarshaller());
87         add(new FlushCommandMarshaller());
88         add(new ConsumerControlMarshaller());
89         add(new JournalTopicAckMarshaller());
90         add(new BrokerIdMarshaller());
91         add(new MessageDispatchMarshaller());
92         add(new ActiveMQMapMessageMarshaller());
93         add(new ActiveMQMessageMarshaller());
94         add(new RemoveInfoMarshaller());
95         add(new ExceptionResponseMarshaller());
96
97     }
98
99     static private void add(DataStreamMarshaller dsm) {
100         marshaller[dsm.getDataStructureType()] = dsm;
101     }
102     
103     static public DataStreamMarshaller[] createMarshallerMap(OpenWireFormat wireFormat) {
104         return marshaller;
105     }
106 }
107
Popular Tags