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