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