1 /**2 *3 * Licensed to the Apache Software Foundation (ASF) under one or more4 * contributor license agreements. See the NOTICE file distributed with5 * this work for additional information regarding copyright ownership.6 * The ASF licenses this file to You under the Apache License, Version 2.07 * (the "License"); you may not use this file except in compliance with8 * the License. You may obtain a copy of the License at9 *10 * http://www.apache.org/licenses/LICENSE-2.011 *12 * Unless required by applicable law or agreed to in writing, software13 * 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 and16 * limitations under the License.17 */18 19 package org.apache.activemq.openwire.v2;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 the30 * 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 -> Marshallers39 */40 static final private DataStreamMarshaller marshaller[] = new DataStreamMarshaller[256];41 static {42 43 add(new ActiveMQBytesMessageMarshaller());44 add(new ActiveMQMapMessageMarshaller());45 add(new ActiveMQMessageMarshaller());46 add(new ActiveMQObjectMessageMarshaller());47 add(new ActiveMQQueueMarshaller());48 add(new ActiveMQStreamMessageMarshaller());49 add(new ActiveMQTempQueueMarshaller());50 add(new ActiveMQTempTopicMarshaller());51 add(new ActiveMQTextMessageMarshaller());52 add(new ActiveMQTopicMarshaller());53 add(new BrokerIdMarshaller());54 add(new BrokerInfoMarshaller());55 add(new ConnectionControlMarshaller());56 add(new ConnectionErrorMarshaller());57 add(new ConnectionIdMarshaller());58 add(new ConnectionInfoMarshaller());59 add(new ConsumerControlMarshaller());60 add(new ConsumerIdMarshaller());61 add(new ConsumerInfoMarshaller());62 add(new ControlCommandMarshaller());63 add(new DataArrayResponseMarshaller());64 add(new DataResponseMarshaller());65 add(new DestinationInfoMarshaller());66 add(new DiscoveryEventMarshaller());67 add(new ExceptionResponseMarshaller());68 add(new FlushCommandMarshaller());69 add(new IntegerResponseMarshaller());70 add(new JournalQueueAckMarshaller());71 add(new JournalTopicAckMarshaller());72 add(new JournalTraceMarshaller());73 add(new JournalTransactionMarshaller());74 add(new KeepAliveInfoMarshaller());75 add(new LastPartialCommandMarshaller());76 add(new LocalTransactionIdMarshaller());77 add(new MessageAckMarshaller());78 add(new MessageDispatchMarshaller());79 add(new MessageDispatchNotificationMarshaller());80 add(new MessageIdMarshaller());81 add(new MessagePullMarshaller());82 add(new NetworkBridgeFilterMarshaller());83 add(new PartialCommandMarshaller());84 add(new ProducerIdMarshaller());85 add(new ProducerInfoMarshaller());86 add(new RemoveInfoMarshaller());87 add(new RemoveSubscriptionInfoMarshaller());88 add(new ReplayCommandMarshaller());89 add(new ResponseMarshaller());90 add(new SessionIdMarshaller());91 add(new SessionInfoMarshaller());92 add(new ShutdownInfoMarshaller());93 add(new SubscriptionInfoMarshaller());94 add(new TransactionInfoMarshaller());95 add(new WireFormatInfoMarshaller());96 add(new XATransactionIdMarshaller());97 98 }99 100 static private void add(DataStreamMarshaller dsm) {101 marshaller[dsm.getDataStructureType()] = dsm;102 }103 104 static public DataStreamMarshaller[] createMarshallerMap(OpenWireFormat wireFormat) {105 return marshaller;106 }107 }108