001 /**
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements. See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License. You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017
018 package org.apache.activemq.openwire.v3;
019
020 import org.apache.activemq.openwire.DataStreamMarshaller;
021 import org.apache.activemq.openwire.OpenWireFormat;
022
023 /**
024 * MarshallerFactory for Open Wire Format.
025 *
026 *
027 * NOTE!: This file is auto generated - do not modify!
028 * if you need to make a change, please see the modify the groovy scripts in the
029 * under src/gram/script and then use maven openwire:generate to regenerate
030 * this file.
031 *
032 *
033 */
034 public final class MarshallerFactory {
035
036 /**
037 * Creates a Map of command type -> Marshallers
038 */
039 private static final DataStreamMarshaller MARSHALLER[] = new DataStreamMarshaller[256];
040 static {
041
042 add(new ActiveMQBlobMessageMarshaller());
043 add(new ActiveMQBytesMessageMarshaller());
044 add(new ActiveMQMapMessageMarshaller());
045 add(new ActiveMQMessageMarshaller());
046 add(new ActiveMQObjectMessageMarshaller());
047 add(new ActiveMQQueueMarshaller());
048 add(new ActiveMQStreamMessageMarshaller());
049 add(new ActiveMQTempQueueMarshaller());
050 add(new ActiveMQTempTopicMarshaller());
051 add(new ActiveMQTextMessageMarshaller());
052 add(new ActiveMQTopicMarshaller());
053 add(new BrokerIdMarshaller());
054 add(new BrokerInfoMarshaller());
055 add(new ConnectionControlMarshaller());
056 add(new ConnectionErrorMarshaller());
057 add(new ConnectionIdMarshaller());
058 add(new ConnectionInfoMarshaller());
059 add(new ConsumerControlMarshaller());
060 add(new ConsumerIdMarshaller());
061 add(new ConsumerInfoMarshaller());
062 add(new ControlCommandMarshaller());
063 add(new DataArrayResponseMarshaller());
064 add(new DataResponseMarshaller());
065 add(new DestinationInfoMarshaller());
066 add(new DiscoveryEventMarshaller());
067 add(new ExceptionResponseMarshaller());
068 add(new FlushCommandMarshaller());
069 add(new IntegerResponseMarshaller());
070 add(new JournalQueueAckMarshaller());
071 add(new JournalTopicAckMarshaller());
072 add(new JournalTraceMarshaller());
073 add(new JournalTransactionMarshaller());
074 add(new KeepAliveInfoMarshaller());
075 add(new LastPartialCommandMarshaller());
076 add(new LocalTransactionIdMarshaller());
077 add(new MessageAckMarshaller());
078 add(new MessageDispatchMarshaller());
079 add(new MessageDispatchNotificationMarshaller());
080 add(new MessageIdMarshaller());
081 add(new MessagePullMarshaller());
082 add(new NetworkBridgeFilterMarshaller());
083 add(new PartialCommandMarshaller());
084 add(new ProducerAckMarshaller());
085 add(new ProducerIdMarshaller());
086 add(new ProducerInfoMarshaller());
087 add(new RemoveInfoMarshaller());
088 add(new RemoveSubscriptionInfoMarshaller());
089 add(new ReplayCommandMarshaller());
090 add(new ResponseMarshaller());
091 add(new SessionIdMarshaller());
092 add(new SessionInfoMarshaller());
093 add(new ShutdownInfoMarshaller());
094 add(new SubscriptionInfoMarshaller());
095 add(new TransactionInfoMarshaller());
096 add(new WireFormatInfoMarshaller());
097 add(new XATransactionIdMarshaller());
098
099 }
100
101 private MarshallerFactory() {
102 }
103
104 private static void add(DataStreamMarshaller dsm) {
105 MARSHALLER[dsm.getDataStructureType()] = dsm;
106 }
107
108 public static DataStreamMarshaller[] createMarshallerMap(OpenWireFormat wireFormat) {
109 return MARSHALLER;
110 }
111 }